Browse Source

[hl] do not memoize extern interfaces

ncannasse 4 days ago
parent
commit
0dbb355f6e
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/generators/genhl.ml

+ 8 - 6
src/generators/genhl.ml

@@ -679,12 +679,14 @@ and class_type ?(tref=None) ctx c pl statics =
 		if not statics then begin
 		if not statics then begin
 			(* add interfaces *)
 			(* add interfaces *)
 			List.iter (fun (i,pl) ->
 			List.iter (fun (i,pl) ->
-				let rid = ref (-1) in
-				rid := add_field "" (fun() ->
-					let t = to_type ctx (TInst (i,pl)) in
-					p.pinterfaces <- PMap.add t !rid p.pinterfaces;
-					t
-				);
+				if not (has_class_flag i CExtern) then begin
+					let rid = ref (-1) in
+					rid := add_field "" (fun() ->
+						let t = to_type ctx (TInst (i,pl)) in
+						p.pinterfaces <- PMap.add t !rid p.pinterfaces;
+						t
+					);
+				end;
 			) c.cl_implements;
 			) c.cl_implements;
 			(* check toString *)
 			(* check toString *)
 			(try
 			(try