Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt
T
2021-09-20 19:08:22 +03:00

26 lines
338 B
Kotlin
Vendored

var result = ""
class C(val token: String) {
fun target(): Int {
result += token
return 42
}
}
fun adapt(f: () -> Unit): Unit = f()
fun overload() {
adapt(C("O")::target)
}
fun overload(unused: String) {
adapt(C("K")::target)
}
fun box(): String {
overload()
overload("")
return result
}