Originally reported in ExDoc.
https://github.com/elixir-lang/ex_doc/issues/1239
Code.Typespec.spec_to_quoted/2 wouldn't know how to deal with a
map with __struct__ key that is not a module, such as in:
@spec foo(%{__struct__: Foo | Bar}) :: any()
Inspired by c1a538e4a8 (#10223)
* Fixes the spec of Keyword.get_and_update!/3 that was missing the :pop return value for the update function
* It removes the concept of the "get" value and replaced it consistently with "current value"
* Renames "initial" argument to "default"
* Uses "existing value" when applicable
* It removes the concept of the "get" value
* Renames "initial" argument to "default"
* Makes use of the concept of "current value" which was already present in some
functions, and uses this in the examples and the specs consistently
- Use "less-than", "greater-than", and "equal to" operators. This the actual name used by Wikipedia and Unicode.
- Give a name to every operator in Kernel.
- Minor improvements here and there.
Previously it would return something like this:
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Keyword.keys/1
The following arguments were given to anonymous fn/1 in Keyword.keys/1:
# 1
{"fetch/2", {:fetch, 2}}
Closes#10010, and it improves 3fd68ef62a
If there is a compile error, Kernel.ParallelCompiler raises
`** (UndefinedFunctionError) function List.Chars.to_charlist/1 is
undefined (module List.Chars is not available)`.
Atoms that have non-ascii characters or @ does not
require tokens. That's to streamline the developer
experience around examples :"foo@computer-name" and
:"hélló".
These tests actually use get_and_update_in/3 and pop_in/2.
I removed the arities, rather than correcting them, since it seems
like unnecessary detail here.
This enhances time unit aware functions in the `Time` module so that
they can operate on `:hour` and `:minute`, along with standard
`System.time_unit/0` values. This eliminates the need to convert all
values to seconds, which allows more expressive time manipulation.
Along with changes to `Time.add/3` and `Time.diff/3`, this adds
a new extended `time_unit` type to `Time`.
This augments the Calendar behaviour by adding
a new function, c:Calendar.day_of_week/4 which
supports a starting_on value with defaults and
calendar specific semantics.