This commit is contained in:
Dmitry Petrov
2016-08-24 17:54:14 +03:00
committed by Dmitry Petrov
parent 4709aaafaa
commit c79b9c12d6
8 changed files with 111 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
fun test1() {
throw Throwable()
}
fun testImplicitCast(a: Any) {
if (a is Throwable) {
throw a
}
}
+16
View File
@@ -0,0 +1,16 @@
IrFile /throw.kt
IrFunction public fun test1(): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
THROW type=<no-type>
CALL .<init> type=kotlin.Throwable operator=null
IrFunction public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false operator=null
WHEN type=kotlin.Unit operator=IF
if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null
then: BLOCK type=<no-type> hasResult=false operator=null
THROW type=<no-type>
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Throwable
GET_VAR a type=kotlin.Any operator=null