Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.fir.kt
T
2021-10-20 22:05:24 +03:00

21 lines
348 B
Kotlin
Vendored

fun foo(arg: Int?) {
val x = arg
if (x != null) {
arg.hashCode()
}
val y: Any? = arg
if (y != null) {
arg<!UNSAFE_CALL!>.<!>hashCode()
}
val yy: Any?
yy = arg
if (yy != null) {
arg.hashCode()
}
var z = arg
z = z?.let { 42 }
if (z != null) {
arg.hashCode()
}
}