Move out jvm-specific part from ir-common
#KT-27005 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
suspend fun foo() = baz<Unit>()
|
||||
suspend fun bar() = baz<Any>()
|
||||
suspend fun <T> baz(): T {
|
||||
TODO()
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
FILE fqName:<root> fileName:/kt27005.kt
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:suspend
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='foo(): Unit'
|
||||
CALL 'baz(): Unit' type=kotlin.Unit origin=null
|
||||
<T>: kotlin.Unit
|
||||
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Any flags:suspend
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): Any'
|
||||
CALL 'baz(): Any' type=kotlin.Any origin=null
|
||||
<T>: kotlin.Any
|
||||
FUN name:baz visibility:public modality:FINAL <T> () returnType:T flags:suspend
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
BLOCK_BODY
|
||||
CALL 'TODO(): Nothing' type=kotlin.Nothing origin=null
|
||||
@@ -5,10 +5,8 @@ FILE fqName:<root> fileName:/catchParameterAccess.kt
|
||||
RETURN type=kotlin.Nothing from='test(() -> Unit): Unit'
|
||||
TRY type=kotlin.Unit
|
||||
try: BLOCK type=kotlin.Unit origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
CATCH parameter=e: Exception /* = Exception */
|
||||
VAR CATCH_PARAMETER name:e type:kotlin.Exception /* = java.lang.Exception */ flags:val
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
|
||||
@@ -4,19 +4,15 @@ FILE fqName:<root> fileName:/extFunInvokeAsFun.kt
|
||||
VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='with1(Any?, Any?.() -> Unit): Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null
|
||||
CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null
|
||||
FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Any?.() -> kotlin.Unit) returnType:kotlin.Unit flags:
|
||||
VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? flags:
|
||||
VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='with2(Any?, Any?.() -> Unit): Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null
|
||||
CALL 'invoke(Any?): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null
|
||||
|
||||
|
||||
@@ -74,9 +74,7 @@ FILE fqName:<root> fileName:/implicitCastToNonNull.kt
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: GET_VAR 'value-parameter x: T' type=T origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(S): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter fn: (S) -> Unit' type=(S) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter x: T' type=T origin=null
|
||||
then: CALL 'invoke(S): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter fn: (S) -> Unit' type=(S) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: GET_VAR 'value-parameter x: T' type=T origin=null
|
||||
|
||||
|
||||
@@ -13,19 +13,15 @@ FILE fqName:<root> fileName:/variableAsFunctionCall.kt
|
||||
VALUE_PARAMETER name:f index:0 type:() -> kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(() -> Unit): Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
FUN name:test2 visibility:public modality:FINAL <> (f:kotlin.String.() -> kotlin.Unit) returnType:kotlin.Unit flags:
|
||||
VALUE_PARAMETER name:f index:0 type:kotlin.String.() -> kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(String.() -> Unit): Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'invoke(String): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: CONST String type=kotlin.String value=hello
|
||||
CALL 'invoke(String): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
p1: CONST String type=kotlin.String value=hello
|
||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test3(): String'
|
||||
|
||||
+39
-49
@@ -1,61 +1,51 @@
|
||||
FILE fqName:<root> fileName:/nonLocalReturn.kt
|
||||
FUN name:test0 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null
|
||||
<R>: kotlin.Nothing
|
||||
block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test0(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
|
||||
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null
|
||||
<R>: kotlin.Nothing
|
||||
block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test0(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
|
||||
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null
|
||||
<R>: kotlin.Nothing
|
||||
block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
|
||||
<R>: kotlin.Unit
|
||||
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null
|
||||
<R>: kotlin.Nothing
|
||||
block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
FUNCTION_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
|
||||
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
|
||||
FUN name:testLrmFoo1 visibility:public modality:FINAL <> (ints:kotlin.collections.List<kotlin.Int>) returnType:kotlin.Unit flags:
|
||||
VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List<kotlin.Int> flags:
|
||||
BLOCK_BODY
|
||||
|
||||
Reference in New Issue
Block a user