-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Possibly change the ordering of integer-literal inference and method selection. #4704
Comments
It's not broken, the devs just changed it yesterday. ;) times now only is defined on
should work. |
Yeah, there was a .. very unfortunate interaction between integer-literal type inference and method selection that meant we wound up accidentally calling one of the numerous integer-typed overloads of We realize this is a bit awkward but it seemed the lesser evil of all the options available at the time of writing. A more complete variant might interleave integer-literal type inference and method selection, but we did not have confidence in our ability to produce such a variant in a timely or correct manner. I'll rename this bug as a placeholder for figuring out something more clever to do here instead. |
Not an issues now that there is an ambiguous method checker thing, I think? Example:
Can you confirm, @graydon> |
Triage visit; as @cmr points out, this is now an entirely different error, but it's still fairly strange since a literal fn main() {
1.to_str();
}
|
Now that fallback is gone, is this still relevant? |
Fallback is back, but it happens late in the cycle, and hence you still need explicit annotation if you plan on invoking methods. This is how the RFC was written and it was no accident, I think we have no plans to change this. Closing bug. |
This works in master(2372d2c) but is broken in incoming(42b462e).
The text was updated successfully, but these errors were encountered: