Skip to content
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

left to right type inference and overload resolution #1466

Open
jvasileff opened this issue Nov 8, 2015 · 3 comments
Open

left to right type inference and overload resolution #1466

jvasileff opened this issue Nov 8, 2015 · 3 comments

Comments

@jvasileff
Copy link
Member

{"1"}.map((s) => JLong.parseLong(s)); // 1
{"1"}.map(JLong.parseLong);  // 2
// ambiguous callable reference to overloaded method or class: 'parseLong' is overloaded

Given that 1 works, would it be possible to also support 2?

@gavinking
Copy link
Member

Ugh. I'm not 100% certain but IIRC it is not possible, no. There is a totally pathological interdependence between type argument inference and overload resolution that means we can't have both.

@jvasileff
Copy link
Member Author

Ok. The workaround isn't so bad. I thought this might be either really easy or really hard 😄

@gavinking
Copy link
Member

I think it's really really hard, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants