Parcourir la source

Fix setting of static variables via reflection when class has no member variables. Closes https://github.com/HaxeFoundation/hxcpp/issues/251

Hugh il y a 10 ans
Parent
commit
1b8622495d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      gencpp.ml

+ 1 - 1
gencpp.ml

@@ -3516,7 +3516,7 @@ let has_set_member_field class_def =
 
 
 let has_set_static_field class_def =
-      let reflect_fields = List.filter (reflective class_def) (class_def.cl_ordered_fields) in
+      let reflect_fields = List.filter (reflective class_def) (statics_except_meta class_def) in
       let reflect_writable = List.filter (is_writable class_def) reflect_fields in
       List.exists variable_field reflect_writable
 ;;