8 lines
204 B
Kotlin
8 lines
204 B
Kotlin
//KT-3821 Invoke convention doesn't work for `this`
|
|
|
|
class A() {
|
|
fun invoke() = 42
|
|
fun foo() = this() // Expecting a function type, but found A
|
|
}
|
|
|
|
fun box() = if (A().foo() == 42) "OK" else "fail" |