e8a640851a
Generate the expression with the original type and then insert an implicit conversion. That matches the behavior of psi2ir better and therefore avoids breaking backend assumptions. In particular, IrGetValue expects the type of the underlying symbol and the type of the IrGetValue to be the same.
16 lines
929 B
Plaintext
Vendored
16 lines
929 B
Plaintext
Vendored
FILE fqName:<root> fileName:/throw.kt
|
|
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
|
BLOCK_BODY
|
|
THROW type=kotlin.Nothing
|
|
CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Throwable' type=kotlin.Throwable origin=null
|
|
FUN name:testImplicitCast visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
|
|
VALUE_PARAMETER name:a index:0 type:kotlin.Any
|
|
BLOCK_BODY
|
|
WHEN type=kotlin.Unit origin=IF
|
|
BRANCH
|
|
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Throwable
|
|
GET_VAR 'a: kotlin.Any declared in <root>.testImplicitCast' type=kotlin.Any origin=null
|
|
then: THROW type=kotlin.Nothing
|
|
TYPE_OP type=kotlin.Throwable origin=IMPLICIT_CAST typeOperand=kotlin.Throwable
|
|
GET_VAR 'a: kotlin.Any declared in <root>.testImplicitCast' type=kotlin.Any origin=null
|