Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.fir.kt
T
Nikolay Lunyak a68a2409d3 [FIR] Remove the applicability filtering when reporting diagnostics
In case we don't want to introduce any new
abstractions like "user relevance for
applicability", we can just remove the
filtering.

^KT-62541 Fixed
2023-10-19 09:27:45 +00:00

22 lines
551 B
Kotlin
Vendored

class A(val x: (String.() -> Unit)?)
fun test(a: A) {
if (a.x != null) {
"".(a.x)()
a.x("") // todo
(a.x)("")
}
"".<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>()
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!>("")
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>("")
with("") {
a.<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!><!NO_VALUE_FOR_PARAMETER!>()<!>
<!UNSAFE_IMPLICIT_INVOKE_CALL!>(a.x)<!>()
if (a.x != null) {
a.x<!NO_VALUE_FOR_PARAMETER!>()<!> // todo
(a.x)()
}
}
}