Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt
T
Mikhail Zarechenskiy cd1ae7f0f2 Add resolution status to report about unsuccessful smartcast
#KT-10248 Fixed
 #KT-11119 Fixed
2017-06-22 13:41:27 +03:00

14 lines
215 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)
}
}