You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting an enum value in Haxe, ordinarily, type inference allows you to use enum values through type inference without an import:
classInstance.classProperty = NO;
Using @:forward on an abstract allows this same functionality in the Haxe 4 preview 5 release, however it is not possible if you define an abstract property:
enumInstance.enumProperty=NO; // Unknown identifier: NO
Note that I'm cheating a bit in my example because I type-hint value:Array<Float>. In the original example, this was untyped and as it turns out, we delay the property checks so far that we don't have the proper type when making the access:
All the Array instances there have an unknown type parameter. This is a different but very much related problem because we cannot top-down infer with uninferred types.
When setting an enum value in Haxe, ordinarily, type inference allows you to use enum values through type inference without an import:
classInstance.classProperty = NO;
Using
@:forward
on an abstract allows this same functionality in the Haxe 4 preview 5 release, however it is not possible if you define an abstract property:Here's code to reproduce the problem, thank you 😄
https://try.haxe.org/#53B4c
The text was updated successfully, but these errors were encountered: