9a95941ef3
This shortens code and avoids unnecessary boxing in some cases.
15 lines
202 B
Kotlin
Vendored
15 lines
202 B
Kotlin
Vendored
class A(val x : Int, val y : A?)
|
|
|
|
fun check(a : A?) : Int {
|
|
return a?.y?.x ?: (a?.x ?: 3)
|
|
}
|
|
|
|
// 0 valueOf
|
|
// 0 Value\s\(\)
|
|
|
|
// JVM_TEMPLATES:
|
|
// 0 ACONST_NULL
|
|
|
|
// JVM_IR_TEMPLATES:
|
|
// 1 ACONST_NULL
|