Files
kotlin-fork/compiler/testData/codegen/box/operatorConventions/kt14201_2.kt
T
2020-03-11 16:01:57 +03:00

27 lines
352 B
Kotlin
Vendored

class A {
val z: String = "OK"
}
class B {
operator fun A.invoke(): String = z
}
class ClassB {
val x = A()
fun B.test(): String {
val value = object {
val z = x()
}
return value.z
}
fun call(): String {
return B().test()
}
}
fun box(): String {
return ClassB().call()
}