JVM_IR more compact safe call chains (almost as old BE)
This commit is contained in:
committed by
teamcityserver
parent
f4eaf611c8
commit
0a67ab54fe
+17
@@ -0,0 +1,17 @@
|
||||
class A(val b: B)
|
||||
class B(val c: C)
|
||||
class C(val s: String)
|
||||
|
||||
fun test(na: A?) =
|
||||
na?.b?.c?.s
|
||||
|
||||
// 1 POP
|
||||
// 1 ACONST_NULL
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 1 DUP
|
||||
// 1 IFNULL
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 3 DUP
|
||||
// 3 IFNULL
|
||||
Reference in New Issue
Block a user