Files
kotlin-fork/compiler/testData/codegen/box/regressions/hashCodeNPE.kt
T
2020-03-23 15:13:50 +03:00

14 lines
230 B
Kotlin
Vendored

// See KT-14242
var x = 1
fun box(): String {
val any: Any? = when (1) {
x -> null
else -> Any()
}
// Must not be NPE here
val hashCode = any?.hashCode()
return hashCode?.toString() ?: "OK"
}