-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
enum abstract
syntax
#6982
enum abstract
syntax
#6982
Conversation
would this require #if haxe3 code in libraries or will both be supported for awhile? |
It's a warning, so it's gonna work either way. I think we have a way to disable warnings now as well. @RealyUniqueName should know more. |
# Conflicts: # src/typing/typeload.ml
Regarding deprecation warnings: we have several of them for Haxe 4.0 , I wonder how we should handle them. For instance compile with -D haxe3-syntax would disable all these warnings. Whereas compiling with -D haxe4-syntax would turn them into errors. |
Question: |
Conceptually, it's still an abstract and comes with all abstract features. So |
I agree that a define to disable Haxe 4 specific warnings would be helpful, all the warnings can get annoying, especially if you can't fix them because they're in third-party libs. I think |
I think it's possible to use the enum Foo { // when "var" it's must be "enum abstract"
var A = 1;
}
enum Bar {// normal enum
A;
} |
@R32 In theory it's not a bad idea. In practice there are multiple differences to consider:
|
I'll go ahead and merge this, then disable the deprecation warning for now. We can re-enable it once we know how to deal with the Haxe 4 transition in general. |
It just occurred to me that we can check for the presence of the |
Allows
enum abstract
instead of@:enum abstract
and deprecates the latter. We still use@:enum
internally for now, so most of the changes here are in .hx files.I'll follow my usual policy of "merge if nobody complains".