Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt
T
2015-07-09 16:36:43 +03:00

14 lines
295 B
Kotlin
Vendored

// !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
}