left to right type inference and overload resolution
jvasileff opened this issue · 3 comments
jvasileff commented
{"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 commented
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 commented
Ok. The workaround isn't so bad. I thought this might be either really easy or really hard 😄
gavinking commented
I think it's really really hard, yes.