JVM_IR more aggressive if-null expressions fusion
Assume that changing a return type from T to T? is not a binary-compatible change.
This commit is contained in:
committed by
teamcityserver
parent
6f0bf766f2
commit
02d8c7527e
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// MODULE: lib
|
||||
// FILE: a.kt
|
||||
class A(val x : Int, val y : A?)
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
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
|
||||
Reference in New Issue
Block a user