Both invocations are marked as ambiguous, which I ...
# announcements
k
Both invocations are marked as ambiguous, which I find very weird.
k
I am guessing the block in q2 can also be typed as
() -> Unit
?
k
Mmh, I guess. Doesn't explain why the first one is ambiguous though.
m
if you decompile
Copy code
val a: ()->String = {""}
val b: ()->Unit = {}
then both have the same type
Function0
still doesn’t fully explain the issue
k
Yeah, that's a jvm for you, but at compile time it should be know which one to call.
It marks both casts as useless, yet removing them makes the file uncompilable again.
m
Are you using new type inference engine? If yes then you can check with the old one and the other way around
k
Neither seems to work
This works, I feel like it's bug reporting time. sighs
l
i
k
Ug, why can't I ever find the correct bugreport