FIR2IR: don't generate unnecessary 'return throw'
#KT-60245 Fixed
This commit is contained in:
committed by
Space Team
parent
90904e4f8a
commit
7d5e2f85cc
@@ -2,9 +2,8 @@ FILE fqName:<root> fileName:/kt30796.kt
|
||||
FUN name:magic visibility:public modality:FINAL <T> () returnType:T of <root>.magic
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun magic <T> (): T of <root>.magic declared in <root>'
|
||||
THROW type=kotlin.Nothing
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.Exception' type=java.lang.Exception origin=null
|
||||
THROW type=kotlin.Nothing
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.Exception' type=java.lang.Exception origin=null
|
||||
FUN name:test visibility:public modality:FINAL <T> (value:T of <root>.test, value2:T of <root>.test) returnType:kotlin.Unit
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
VALUE_PARAMETER name:value index:0 type:T of <root>.test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun <T : Any?> magic(): T {
|
||||
return throw Exception()
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
fun <T : Any?> test(value: T, value2: T) {
|
||||
|
||||
Reference in New Issue
Block a user