Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/invoke/kt30695.fir.kt
T
Pavel Kirpichenkov b045adf83a [NI] Report unsafe implicit invoke accordingly to OI
There are several issues with unsafe desugaring for convention calls.
Proper fix is not implemented here (see design proposal KT-30872).
This commit only applies the old logic in the new inference.
^KT-30695 Fixed
2020-02-13 14:49:43 +03:00

19 lines
279 B
Kotlin
Vendored

class A {
val lambda: () -> Unit = TODO()
val memberInvoke: B = TODO()
val extensionInvoke: C = TODO()
}
class B {
operator fun invoke() {}
}
class C
operator fun C.invoke() {}
fun test(a: A?) {
a?.lambda()
a?.memberInvoke()
a?.extensionInvoke()
}