454ae3b17a
Previously if an unsafe call is to an overloaded function, FIR checkers report NONE_APPLICABLE. This change instead report them as UNSAFE_CALL or its variants.
30 lines
484 B
Kotlin
Vendored
30 lines
484 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
class A {
|
|
fun f(x: Boolean): Int = 0
|
|
|
|
fun f(y: String): Int = 0
|
|
}
|
|
|
|
class B {
|
|
private var a: A? = null
|
|
|
|
fun takeInt(i: Int) {}
|
|
|
|
fun f() {
|
|
a = A()
|
|
a<!UNSAFE_CALL!>.<!>f(true)
|
|
takeInt(a<!UNSAFE_CALL!>.<!>f(""))
|
|
a.<!NONE_APPLICABLE!>f<!>()
|
|
}
|
|
|
|
fun g() {
|
|
takeInt(if (3 > 2) {
|
|
a = A()
|
|
a<!UNSAFE_CALL!>.<!>f(true)
|
|
} else {
|
|
6
|
|
})
|
|
}
|
|
}
|