Ensure typespecs allow tuple to be used as variable names
Module
Typespec
16 changes across 10 versions
Changes by version
char_list/0 type is deprecated in favor of charlist/0
Add support for %{required(foo) => bar} and %{optional(foo) => bar} forms (Erlang 19 only)
Add support for @optional_callbacks to mark certain that certain callbacks may be optionally implemented
Introduce %{...} to mean any map (Erlang 19 only)
char_list is soft-deprecated in favor of charlist
Correctly support <<_::size, _::_*unit>> syntax
Allow %Struct{} syntax to be used in typespecs
Allow record(:record, fields) syntax to be used in typespecs
Fix a bug where the list typespec was incorrectly rendered as []
Delay typespec compilation to after expansion
Fix conversion of unary ops from typespec format to ast
Fix handling of tuple() and {}
when clauses were moved to the outer part of the spec and should be in the keywords format. So add(a, b) when is_subtype(a, integer) and is_subtype(b, integer) :: integer should now be written as add(a, b) :: integer when a: integer, b: integer
Guarantee typespecs error reports point to the proper line
Improve error messages to contain file, line and the typespec itself