Browse Source

[typer] make sure initialization actually picks up String

and not any of its deadbeat inline children
Simon Krajewski 1 year ago
parent
commit
8ce18536e7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/typing/typerEntry.ml

+ 2 - 2
src/typing/typerEntry.ml

@@ -127,7 +127,7 @@ let create com macros =
 	) ctx.g.std_types.m_types;
 	) ctx.g.std_types.m_types;
 	let m = TypeloadModule.load_module ctx ([],"String") null_pos in
 	let m = TypeloadModule.load_module ctx ([],"String") null_pos in
 	List.iter (fun mt -> match mt with
 	List.iter (fun mt -> match mt with
-		| TClassDecl c ->
+		| TClassDecl ({cl_path = ([],"String")} as c) ->
 			let t = (TInst (c,[])) in
 			let t = (TInst (c,[])) in
 			Type.unify t ctx.t.tstring;
 			Type.unify t ctx.t.tstring;
 			ctx.t.tstring <- t
 			ctx.t.tstring <- t
@@ -135,7 +135,7 @@ let create com macros =
 	) m.m_types;
 	) m.m_types;
 	let m = TypeloadModule.load_module ctx ([],"Std") null_pos in
 	let m = TypeloadModule.load_module ctx ([],"Std") null_pos in
 	List.iter (fun mt -> match mt with
 	List.iter (fun mt -> match mt with
-		| TClassDecl c -> ctx.g.std <- c;
+		| TClassDecl ({cl_path = ([],"Std")} as c) -> ctx.g.std <- c;
 		| _ -> ()
 		| _ -> ()
 	) m.m_types;
 	) m.m_types;
 	let m = TypeloadModule.load_module ctx ([],"Array") null_pos in
 	let m = TypeloadModule.load_module ctx ([],"Array") null_pos in