-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
lower bound interferes with typevar value inference #30713
Comments
Shouldn't the assignment be to something else (e.g., |
Yes, I think the lower bound just makes it too hard for us to derive a unique value for |
It looks to me, based on the |
Yes, dispatch is now (as of 0.7) totally de-coupled from determining the values of static parameters. We know the arguments are a subtype, and so the method matches, we just don't know what value There are various cases where we can't determine the value of a static parameter, and we decided it was better to give errors in those cases than to affect method matching --- that way (1) if you don't use the value of the static parameter there's no problem, (2) if you hit the error you can work around it with an |
Consider the following:
gives:
Expected is to return
Tuple{XX,YY}
Similarly:
Expected is to return
Tuple{YY,XX}
For interest:
bar(XX(), YY(), (XX(), XX())
andbar(XX(), XX(), (XX(), XX())
, andbar(XX(), XX(), (YY(),YY()))
andbar(YY(), YY(), (YY(),YY()))
andbar(YY(),XX(), (YY(),YY()))
give method errorsThe text was updated successfully, but these errors were encountered: