Browse Source

[js] support unqualified static field access for @:native("") classes (see #6448)

Dan Korostelev 8 years ago
parent
commit
6d896687a2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/generators/genjs.ml

+ 2 - 0
src/generators/genjs.ml

@@ -498,6 +498,8 @@ and gen_expr ctx e =
 	| TEnumParameter (x,_,i) ->
 	| TEnumParameter (x,_,i) ->
 		gen_value ctx x;
 		gen_value ctx x;
 		print ctx "[%i]" (i + 2)
 		print ctx "[%i]" (i + 2)
+	| TField (_, FStatic ({cl_path = [],""},f)) ->
+		spr ctx f.cf_name;
 	| TField (x, (FInstance(_,_,f) | FStatic(_,f) | FAnon(f))) when Meta.has Meta.SelfCall f.cf_meta ->
 	| TField (x, (FInstance(_,_,f) | FStatic(_,f) | FAnon(f))) when Meta.has Meta.SelfCall f.cf_meta ->
 		gen_value ctx x;
 		gen_value ctx x;
 	| TField (x,f) ->
 	| TField (x,f) ->