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
Variance type hole with core-type abstracts #2844
Comments
Ouch that's a huge regression compared to Haxe 2.10 Why is the Float/Int allowed ? they are two different core types, they should not be type_eq |
This was an oversight from me trying to fix the mess your UInt merge caused. It's a very easy fix, but the UInt issue remains. I'll go ahead and re-enable the unification behavior right now and leave this issue open for UInt. |
Also we should hire some intern to add TCoreType. They have special semantics in virtually every single place. |
So the current problem is this:
Right now this is allowed on neko and co because there UInt is defined with Int as the underlying type, which allows variance. It is not allowed on flash because there UInt is a core-type. |
So I "think" I dealt with both the original issue and the UInt inconsistency. I'm still nervous about this, but we will see how it goes. |
Actually I've changed my mind. I'll keep the type hole closed but revert everything related to UInt. Turning it into a |
Actually the original issue here is fixed. I'll close this and open a new issue for UInt later. |
We currently allow this to compile:
There is a bug in the unification handler because core-type abstracts should not allow this kind of variance. The problem is that UInt has
@:coreType
on some platforms (flash and cs), but not on others. This would lead to inconsistent behavior.I don't know what to do with this right now...
The text was updated successfully, but these errors were encountered: