-
-
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
Overriding functions with Dynamic param #4900
Comments
That happens because monomorphs are not bound to Dynamic. Not worth fixing in my opinion, it's good practice to type-hint your function arguments and not doing so can lead to other inference issues as well. |
Would it help if there were special semantics for |
Do you mean automatically inferring |
btw this is a breaking change because it worked in 3.2.1 |
Perhaps, yeah? Although that seems potentially dangerous if the compiler doesn't also make sure |
Oh man... I thought |
Yeah, that seems like something that can introduce subtle bugs. Maybe it's a good idea to only allow that for |
@kevinresol: Yes, that comes from fixing #4378 which intentionally allowed Dynamic variance. I'll have to check the regression though. |
I am not sure what I expect here, given that |
I still don't think it's worth fixing this, so I'll go ahead and close it. |
Fails with:
Field test overloads parent class with different or incomplete type
(Haxe: b0b16f2)Compiles fine when changing type of b to non-Dynamic, or specify
(_, b:Dynamic)
in the overrideThe text was updated successfully, but these errors were encountered: