Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt1358.kt
T

13 lines
312 B
Kotlin
Vendored

// FIR_IDENTICAL
//KT-1358 Overload resolution ambiguity with smartcast and generic function
package d
fun bar(a: Any?) {
if (a != null) {
a.foo() //overload resolution ambiguity
a.sure() //overload resolution ambiguity
}
}
fun <T : Any> T?.foo() {}
fun <T : Any> T?.sure() : T = this!!