Ahmed Mourad
01/19/2021, 8:00 PMclass A<T>
fun <T> A<T>.doSomething(v: T) = Unit
fun <T> A<T>.doSomething(v: (T) -> T) = Unit
fun x() {
//Works fine
A<String>().doSomething("")
//Cannot choose among the candidates without completing type inference
A<String>().doSomething { "" }
}
Is there a way to fix this without having to explicitly provide the type params? something similar to @BuilderInference
maybe?Animesh Sahu
01/20/2021, 4:05 AM