Explorar o código

Under js_flatten, all statics need to be explicitly defined.

Bruno Garcia %!s(int64=12) %!d(string=hai) anos
pai
achega
3a40c84ca0
Modificáronse 1 ficheiros con 2 adicións e 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 ->
 		()