Files
kotlin-fork/compiler/testData/codegen/box/regressions/hashCodeNPE.kt
T
2019-11-19 11:00:09 +03:00

15 lines
260 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// 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"
}