瀏覽代碼

Allow for EnumTools and EnumValueTools in separate files

Hugh Sanderson 12 年之前
父節點
當前提交
65a313d982
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      typer.ml

+ 5 - 0
typer.ml

@@ -3881,6 +3881,11 @@ let rec create com =
 	let m = Typeload.load_module ctx (["haxe"],"EnumTools") null_pos in
 	(match m.m_types with
 	| [TClassDecl c1;TClassDecl c2] -> ctx.g.global_using <- c1 :: c2 :: ctx.g.global_using
+	| [TClassDecl c1] ->
+		let m = Typeload.load_module ctx (["haxe"],"EnumValueTools") null_pos in
+		(match m.m_types with
+		| [TClassDecl c2 ] -> ctx.g.global_using <- c1 :: c2 :: ctx.g.global_using
+		| _ -> assert false);
 	| _ -> assert false);
 	ctx