608b88996a
Check directly that the referenced function is an extension function instead of relying on the annotation on the type. ^ KT-47988 Fixed.
18 lines
262 B
Kotlin
Vendored
18 lines
262 B
Kotlin
Vendored
class A(var x: String)
|
|
|
|
fun f(s: String): String {
|
|
fun A.localX() {
|
|
x = s + "K"
|
|
}
|
|
|
|
val a: A = A("FAIL")
|
|
a.apply(A::localX)
|
|
if (a.x != "OK") return a.x
|
|
a.apply { localX() }
|
|
return a.x
|
|
}
|
|
|
|
fun box(): String {
|
|
return f("O")
|
|
}
|