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.
18 lines
352 B
Kotlin
Vendored
18 lines
352 B
Kotlin
Vendored
abstract class Runnable(val arg: Int) {
|
|
abstract fun run(): Int
|
|
}
|
|
|
|
fun foo(): Int {
|
|
val c: Int? = null
|
|
val a: Int? = 1
|
|
if (c is Int) {
|
|
val k = object: Runnable(a!!) {
|
|
override fun run() = arg
|
|
}
|
|
k.run()
|
|
val d: Int = c
|
|
return a <!UNSAFE_OPERATOR_CALL!>+<!> d
|
|
}
|
|
else return -1
|
|
}
|