Files
kotlin/compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundant.kt
Alexander Udalov 6a90dc2efe Fix bytecode text tests for language version 1.4
New null check assertions are generated a bit more efficiently, with a
call to `checkNotNull` instead of IFNONNULL+jump.
2020-01-20 19:12:59 +01:00

20 lines
233 B
Kotlin
Vendored

class A
fun box() {
val x: A? = A()
val y: A?
if (1 == 0) {
y = x
}
else {
y = null
}
y!!
}
// 0 IFNULL
// 0 IFNONNULL
// 0 ATHROW
// 1 checkNotNull \(Ljava/lang/Object;\)V
// 0 throwNpe