浏览代码

[typer] rebind some collections in per-field context

Simon Krajewski 5 年之前
父节点
当前提交
0fc86edfe6
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/typing/typeloadFields.ml

+ 5 - 0
src/typing/typeloadFields.ml

@@ -551,6 +551,11 @@ let create_field_context (ctx,cctx) c cff =
 	let ctx = {
 		ctx with
 		pass = PBuildClass; (* will be set later to PTypeExpr *)
+		locals = PMap.empty;
+		opened = [];
+		monomorphs = {
+			perfunction = [];
+		};
 	} in
 	let display_modifier = Typeload.check_field_access ctx cff in
 	let is_static = List.mem_assoc AStatic cff.cff_access in