-
Notifications
You must be signed in to change notification settings - Fork 15
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
Type inference (with -Ypartial-unification) doesn't work for default arguments #366
Comments
This is the consequence of a special-case in type-checking defaults. The idea is to enable this:
So the following still gives an error:
Maybe that feature is questionable, it's a bit of a hack that hasn't been discussed in very much detail. Another example that might be surprising:
|
Thanks for the explanation. The feature seems a little odd. I wonder if it has a good use (the example from the spec is not very useful). |
if (in 2.13.0-M5 or 2.13.x HEAD) there's still an issue here that deserves a ticket, please open one in scala/bug |
Try to compile the following code with scalac 2.12.1 with
-language:higherKinds -Ypartial-unification
It gives the following error:
My expectation would be that type inference works the same in these two cases.
The text was updated successfully, but these errors were encountered: