Browse Source

allow to access root package with __ prefix

Nicolas Cannasse 13 years ago
parent
commit
3ea72fc1ee
2 changed files with 2 additions and 0 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 1 0
      typeload.ml

+ 1 - 0
doc/CHANGES.txt

@@ -35,6 +35,7 @@
 	all : null, true and false are now keywords
 	all : neko.io.Path, cpp.io.Path and php.io.Path are now haxe.io.Path
 	neko, cpp, php : added Sys class and sys.io package
+	all : allow to access root package with __ prefix (__.Type for example)
 
 2011-09-25: 2.08
 	js : added js.JQuery

+ 1 - 0
typeload.ml

@@ -76,6 +76,7 @@ let rec load_type_def ctx p t =
 	with
 		Not_found ->
 			let next() =
+				let t = (match t.tpackage with "__" :: l -> { t with tpackage = l } | _ -> t) in
 				let m = ctx.g.do_load_module ctx (t.tpackage,t.tname) p in
 				let tpath = (t.tpackage,tname) in
 				try