FIR2IR: Fix line number differences in try block
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5aa8e2d0d1
commit
e5bff514b6
+2
-1
@@ -25,7 +25,8 @@ FILE fqName:<root> fileName:/useNextParamInLambda.kt
|
||||
CONST String type=kotlin.String value="fail"
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
TRY type=kotlin.Any
|
||||
try: CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
try: BLOCK type=kotlin.String origin=null
|
||||
CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
CATCH parameter=val e: java.lang.Exception [val] declared in <root>.box
|
||||
VAR name:e type:java.lang.Exception [val]
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
|
||||
+4
-1
@@ -10,7 +10,9 @@ fun f(f1: Function0<String> = local fun <anonymous>(): String {
|
||||
|
||||
fun box(): String {
|
||||
var result: String = "fail"
|
||||
try f()
|
||||
try { // BLOCK
|
||||
f()
|
||||
}
|
||||
catch (e: Exception){ // BLOCK
|
||||
result = "OK"
|
||||
}
|
||||
@@ -23,3 +25,4 @@ fun box(): String {
|
||||
}
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user