IrCatch element.

This commit is contained in:
Dmitry Petrov
2016-09-15 14:24:21 +03:00
committed by Dmitry Petrov
parent c02ae4a4a5
commit 90119880c5
11 changed files with 104 additions and 92 deletions
+9 -7
View File
@@ -1,22 +1,24 @@
FILE /tryCatch.kt
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
TRY_CATCH type=kotlin.Unit
TRY type=kotlin.Unit
try: BLOCK type=kotlin.Unit origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
catch e: BLOCK type=kotlin.Unit origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
CATCH parameter=e: Throwable
BLOCK type=kotlin.Unit origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
finally: BLOCK type=kotlin.Unit origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
FUN public fun test2(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='test2(): Int'
TRY_CATCH type=kotlin.Int
TRY type=kotlin.Int
try: BLOCK type=kotlin.Int origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
CONST Int type=kotlin.Int value='42'
catch e: BLOCK type=kotlin.Int origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
CONST Int type=kotlin.Int value='24'
CATCH parameter=e: Throwable
BLOCK type=kotlin.Int origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
CONST Int type=kotlin.Int value='24'
finally: BLOCK type=kotlin.Unit origin=null
CALL 'println(): Unit' type=kotlin.Unit origin=null
@@ -6,9 +6,10 @@ FILE /tryCatchWithImplicitCast.kt
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
then: RETURN type=kotlin.Nothing from='testImplicitCast(Any): Unit'
VAR val t: kotlin.String
TRY_CATCH type=kotlin.String
TRY type=kotlin.String
try: BLOCK type=kotlin.String origin=null
TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
catch e: BLOCK type=kotlin.String origin=null
CONST String type=kotlin.String value=''
CATCH parameter=e: Throwable
BLOCK type=kotlin.String origin=null
CONST String type=kotlin.String value=''