-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Function parameter only gets inferentially typed if a type parameter coincides with it #1449
Comments
Note that this may make it hard to be smarter about determining whether a given expression is context sensitive. |
Since we have not gotten any concrete feedback on this, i am inclined to leave the current rule the way it is. |
I am not so sure that we haven't gotten feedback on this. We get a lot of nebulous type argument inference bug reports, and some of them may in fact be related to this. We can sit on it, but I don't think it matches user expectations. |
Invoking the 1-year clause on this one |
Reading this again, over a year later, I have to say I'm not surprised that nobody cared! |
In inferential typing, we only fix a type parameter and contextually type a function parameter if the inference walker hits the type parameter and the function parameter at the same time (foo2 below). Ideally, we would also want this to work if the walker hits the type parameter before hitting the function parameter in the argument (foo1). At that point, we may fix the type parameter, and then keep drilling into it, then use the relevant part when we hit the function parameter in the argument.
The text was updated successfully, but these errors were encountered: