Browse Source

[typer] rebind some collections in per-field context

Simon Krajewski 5 years ago
parent
commit
0fc86edfe6
1 changed files with 5 additions and 0 deletions
  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