Explorar el Código

Under js_flatten, all statics need to be explicitly defined.

Bruno Garcia hace 12 años
padre
commit
3a40c84ca0
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      genjs.ml

+ 2 - 1
genjs.ml

@@ -861,7 +861,8 @@ let check_field_name c f =
 
 let gen_class_static_field ctx c f =
 	match f.cf_expr with
-	| None | Some { eexpr = TConst TNull } when not (has_feature ctx "Type.getClassFields") ->
+	(* Under js_flatten, all statics need to be explicitly defined, even when null *)
+	| None | Some { eexpr = TConst TNull } when not (has_feature ctx "Type.getClassFields") && not ctx.js_flatten ->
 		()
 	| None when is_extern_field f ->
 		()