Qualified expressions and safe calls
This commit is contained in:
committed by
Dmitry Petrov
parent
b80782c295
commit
3e11f35918
+4
-4
@@ -6,14 +6,14 @@ IrFile /calls.kt
|
||||
IrFunction public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.Int
|
||||
CALL foo
|
||||
CALL .foo
|
||||
x: VAR x
|
||||
y: LITERAL Int type=kotlin.Int value='1'
|
||||
IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.Int
|
||||
CALL foo
|
||||
x: CALL foo
|
||||
CALL .foo
|
||||
x: CALL .foo
|
||||
x: VAR x
|
||||
y: VAR x
|
||||
y: VAR x
|
||||
@@ -24,6 +24,6 @@ IrFile /calls.kt
|
||||
IrFunction public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.Int
|
||||
CALL foo
|
||||
CALL .foo
|
||||
x: $RECEIVER of: <root>
|
||||
y: VAR x
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun length(s: String) = s.length
|
||||
fun lengthN(s: String?) = s?.length
|
||||
|
||||
// IR_FILE_TXT dotQualified.txt
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
IrFile /dotQualified.kt
|
||||
IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.Int
|
||||
CALL .length PROPERTY_GET
|
||||
$this: VAR s
|
||||
IrFunction public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int?
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.Int?
|
||||
CALL ?.length PROPERTY_GET
|
||||
$this: VAR s
|
||||
@@ -7,5 +7,5 @@ IrFile /extensionPropertyGetterCall.kt
|
||||
IrFunction public fun kotlin.String.test5(): kotlin.String
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
CALL okext PROPERTY_GET
|
||||
CALL .okext PROPERTY_GET
|
||||
$receiver: $RECEIVER of: test5
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@ IrFile /references.kt
|
||||
IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
CALL ok PROPERTY_GET
|
||||
CALL .ok PROPERTY_GET
|
||||
IrProperty public val ok3: kotlin.String getter=<get-ok3> setter=null
|
||||
IrPropertyGetter public fun <get-ok3>(): kotlin.String property=ok3
|
||||
IrExpressionBody
|
||||
@@ -15,7 +15,7 @@ IrFile /references.kt
|
||||
IrFunction public fun test1(): kotlin.String
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
CALL ok PROPERTY_GET
|
||||
CALL .ok PROPERTY_GET
|
||||
IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
@@ -29,7 +29,7 @@ IrFile /references.kt
|
||||
IrFunction public fun test4(): kotlin.String
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
CALL ok3 PROPERTY_GET
|
||||
CALL .ok3 PROPERTY_GET
|
||||
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
|
||||
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
|
||||
IrExpressionBody
|
||||
@@ -38,5 +38,5 @@ IrFile /references.kt
|
||||
IrFunction public fun kotlin.String.test5(): kotlin.String
|
||||
IrExpressionBody
|
||||
RETURN type=kotlin.String
|
||||
CALL okext PROPERTY_GET
|
||||
CALL .okext PROPERTY_GET
|
||||
$receiver: $RECEIVER of: test5
|
||||
|
||||
Reference in New Issue
Block a user