Skip to content

Commit 2244a2f

Browse files
committed
Deprecate ... as a valid function call identifier
1 parent 2bafc60 commit 2244a2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/elixir/src/elixir_parser.yrl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,11 @@ build_identifier({'.', Meta, _} = Dot, Args) ->
910910
build_identifier({op_identifier, Location, Identifier}, [Arg]) ->
911911
{Identifier, [{ambiguous_op, nil} | meta_from_location(Location)], [Arg]};
912912

913+
%% TODO: Either remove ... or make it an operator on v2.0
914+
build_identifier({_, {Line, Column, _} = Location, '...'}, Args) when is_list(Args) ->
915+
warn({Line, Column}, "... is no longer supported as a function call and it must receive no arguments"),
916+
{'...', meta_from_location(Location), Args};
917+
913918
build_identifier({_, Location, Identifier}, Args) ->
914919
{Identifier, meta_from_location(Location), Args}.
915920

0 commit comments

Comments
 (0)