For maps and lists:
$ elixir -e "%{foo: :bar, :baz => :bat}"
** (SyntaxError) nofile:1: unexpected expression after keyword list. Keyword lists must always come last in lists and maps. Therefore, this is not allowed:
[some: :value, :another]
%{some: :value, another => value}
Instead, reorder it to be the last entry:
[:another, some: :value]
%{another => value, some: :value}
Syntax error after: ','
(elixir 1.13.0-dev) lib/code.ex:655: Code.eval_string_with_error_handling/3
For calls:
$ elixir -e "call foo: :bar, :baz"
** (SyntaxError) nofile:1: unexpected expression after keyword list. Keyword lists must always come as the last argument. Therefore, this is not allowed:
function_call(1, some: :option, 2)
Instead, wrap the keyword in brackets:
function_call(1, [some: :option], 2)
Syntax error after: ','
(elixir 1.13.0-dev) lib/code.ex:655: Code.eval_string_with_error_handling/3
Closes#10973.