-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflect.field issues #4107
Comments
This is a bugfix, static fields should not be listed as part of the instance fields. I have added a note in the breaking change overview: https://github.com/HaxeFoundation/haxe/wiki/Breaking-changes-in-Haxe-3.2.0 |
This is a fix in Haxe 3.2, CPP is now correctly aligned with other targets behaviors : Reflect.field on instance will not be able to access statics, you need to use Reflect.field(Type.getClass(new A()),"STATIC_FIELD") for that. |
I was more relying on the fact that the static fields were kind of inherited using this method ;) |
I ended up making a utility class to handle my needs
It works for me but while coding it I found out that |
@hughsando: Could you check that? |
This is now fixed on hxcpp to match neko. @Simn - Not sure if this is the "official" behaviour, and whether you want to add a test. |
The following code:
Running with Haxe 3.1.3, mac cpp target, traces the following:
While running with Haxe 3.2 rc2, mac cpp target, it traces the following:
The text was updated successfully, but these errors were encountered: