Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt
T
2021-01-29 16:55:26 +03:00

15 lines
312 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-1270 Poor highlighting when trying to dereference a nullable reference
package kt1270
fun foo() {
val sc = java.util.HashMap<String, SomeClass>()[""]
val value = sc<!UNSAFE_CALL!>.<!>value
}
private class SomeClass() {
val value : Int = 5
}