Browse Source

Fix evalContext env leak, by Simn

closes #11642
Yuxiao Mao 1 năm trước cách đây
mục cha
commit
6e4fd96cb5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/macro/eval/evalContext.ml

+ 1 - 1
src/macro/eval/evalContext.ml

@@ -467,7 +467,7 @@ let push_environment ctx info =
 		env_locals = locals;
 		env_captures = captures;
 		env_extra_locals = IntMap.empty;
-		env_parent = eval.env;
+		env_parent = if info.kind = EKEntrypoint then None else eval.env;
 		env_eval = eval;
 		env_stack_depth = stack_depth;
 	} in