Ver código fonte

[jvm] banish private toplevel types to haxe.root

closes #9520
Simon Krajewski 5 anos atrás
pai
commit
be100785bc
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      src/generators/genjvm.ml

+ 5 - 1
src/generators/genjvm.ml

@@ -2794,7 +2794,11 @@ module Preprocessor = struct
 			()
 			()
 		else if mt.mt_private && has_primary_type mt.mt_module then begin
 		else if mt.mt_private && has_primary_type mt.mt_module then begin
 			let m = mt.mt_module in
 			let m = mt.mt_module in
-			mt.mt_path <- (fst m.m_path,Printf.sprintf "%s$%s" (snd m.m_path) (snd mt.mt_path))
+			let pack = match fst m.m_path with
+				| [] -> ["haxe";"root"]
+				| pack -> pack
+			in
+			mt.mt_path <- (pack,Printf.sprintf "%s$%s" (snd m.m_path) (snd mt.mt_path))
 		end else if fst mt.mt_path = [] then
 		end else if fst mt.mt_path = [] then
 			mt.mt_path <- make_root mt.mt_path
 			mt.mt_path <- make_root mt.mt_path