Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/kt49038.kt
T
2021-10-01 22:09:33 +03:00

14 lines
298 B
Kotlin
Vendored

fun take(arg: Any) {}
fun <T> foo(a: A, t: T) {} // 1
fun <T> foo(b: B, t : T) {} // 2
fun foo(i: Int) {} // 3
class A
class B
fun box(): String {
val ref1 = take(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>foo<!>) // error before 1.6.20; ok, resolved to (3) since 1.6.20
return "OK"
}