Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt
T
Dmitriy Novozhilov 796f8e6bce Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00

15 lines
216 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
class B
fun A.foo(a: A) {}
fun A.foo(b: B) {}
var a: A? = null
fun smartCastInterference(b: B) {
if (a != null) {
<!SMARTCAST_IMPOSSIBLE!>a<!>.foo(b)
}
}