mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
19 lines
195 B
Kotlin
Vendored
19 lines
195 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
|
|
// 1 IFNONNULL
|
|
// 1 throwNpe
|
|
// 0 ATHROW
|