Skip to content

Commit 40e9306

Browse files
committed
Use definition instead of origin in meta
1 parent 03c123a commit 40e9306

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/elixir/src/elixir_clauses.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ warn_catch_before_rescue([_ | Rest], Meta, E, Found) ->
540540
warn_catch_before_rescue(Rest, Meta, E, Found).
541541

542542
origin(Meta, Default) ->
543-
case lists:keyfind(origin, 1, Meta) of
544-
{origin, Origin} -> Origin;
543+
case lists:keyfind(definition, 1, Meta) of
544+
{definition, Definition} -> Definition;
545545
false -> Default
546546
end.
547547

lib/elixir/src/elixir_def.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def_to_clauses(_Kind, Meta, Args, Guards, [{do, Body}], _E) ->
247247
def_to_clauses(Kind, Meta, Args, Guards, Body, E) ->
248248
case is_list(Body) andalso lists:keyfind(do, 1, Body) of
249249
{do, _} ->
250-
[{Meta, Args, Guards, {'try', [{origin, Kind} | Meta], [Body]}}];
250+
[{Meta, Args, Guards, {'try', [{definition, Kind} | Meta], [Body]}}];
251251
false ->
252252
elixir_errors:file_error(Meta, E, elixir_expand, {missing_option, Kind, [do]})
253253
end.

0 commit comments

Comments
 (0)