Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/kt1270.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

13 lines
283 B
Kotlin

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