Skip to content

Commit 3fbe977

Browse files
committed
Validate Macro.Env struct upfront to avoid failures deep within the compiler, closes #15088
1 parent cebc5a7 commit 3fbe977

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/elixir/src/elixir.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ start_cli() ->
201201

202202
%% EVAL HOOKS
203203

204-
env_for_eval(#{lexical_tracker := Pid} = Env) ->
204+
env_for_eval(#{'__struct__' := 'Elixir.Macro.Env', lexical_tracker := Pid} = Env) when map_size(Env) == 15 ->
205205
NewEnv = Env#{
206206
context := nil,
207207
macro_aliases := [],

0 commit comments

Comments
 (0)