2
0
Эх сурвалжийг харах

fixed @:native for enums with module caching

Nicolas Cannasse 13 жил өмнө
parent
commit
60d163705d
1 өөрчлөгдсөн 9 нэмэгдсэн , 0 устгасан
  1. 9 0
      main.ml

+ 9 - 0
main.ml

@@ -401,6 +401,15 @@ and wait_loop boot_com host port =
 		List.iter (fun t ->
 			match t with
 			| TClassDecl c -> c.cl_restore()
+			| TEnumDecl e ->
+				let rec loop acc = function
+					| [] -> ()
+					| (":real",[Ast.EConst (Ast.String path),_],_) :: l ->
+						e.e_path <- Ast.parse_path path;
+						e.e_meta <- (List.rev acc) @ l;
+					| x :: l -> loop (x::acc) l
+				in
+				loop [] e.e_meta
 			| _ -> ()
 		) m.m_types
 	in