Files
kotlin/compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundantNotOptimizable.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
239 B
Kotlin
Vendored

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