Browse Source

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

Hugh 10 years ago
parent
commit
1b8622495d
1 changed files with 1 additions and 1 deletions
  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
 ;;