소스 검색

[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