Update to origin/master.
IrReturn should return 'Unit' for "return without value".
This commit is contained in:
@@ -18,6 +18,7 @@ FILE /smartCasts.kt
|
||||
if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String
|
||||
GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
then: RETURN type=kotlin.Nothing from='test1(Any): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALL 'println(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String
|
||||
|
||||
@@ -16,6 +16,7 @@ FILE /smartCastsWithDestructuring.kt
|
||||
if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=I2
|
||||
GET_VAR 'value-parameter x: I1' type=I1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='test(I1): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_container: I1
|
||||
GET_VAR 'value-parameter x: I1' type=I1 origin=null
|
||||
|
||||
@@ -6,6 +6,7 @@ FILE /tryCatchWithImplicitCast.kt
|
||||
if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String
|
||||
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
|
||||
then: RETURN type=kotlin.Nothing from='testImplicitCast(Any): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
VAR val t: kotlin.String
|
||||
TRY type=kotlin.String
|
||||
try: BLOCK type=kotlin.String origin=null
|
||||
|
||||
@@ -19,6 +19,7 @@ FILE /justLambda.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): () -> kotlin.Unit
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -7,6 +7,7 @@ FILE /nonLocalReturn.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Nothing
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test0(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALLABLE_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN public fun test1(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
@@ -16,6 +17,7 @@ FILE /nonLocalReturn.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN public fun test2(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
@@ -25,6 +27,7 @@ FILE /nonLocalReturn.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN public fun testLrmFoo1(ints: kotlin.collections.List<kotlin.Int>): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
@@ -40,6 +43,7 @@ FILE /nonLocalReturn.kt
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
@@ -58,6 +62,7 @@ FILE /nonLocalReturn.kt
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
|
||||
Reference in New Issue
Block a user