Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/inference/kt29767.kt
T
2019-02-17 13:03:01 +03:00

11 lines
269 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// ISSUE: KT-29767
fun test(a: MutableList<out Int?>?) {
if (a != null) {
val b = <!OI;DEBUG_INFO_SMARTCAST!>a<!>[0] // no SMARTCAST diagnostic
if (b != null) {
<!DEBUG_INFO_SMARTCAST!>b<!>.inc()
}
}
}