Generate catch-block body within proper scope
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
fun test(f: () -> Unit) =
|
||||
try { f() } catch (e: Exception) { throw e }
|
||||
@@ -0,0 +1,14 @@
|
||||
FILE /catchParameterAccess.kt
|
||||
FUN public fun test(f: () -> kotlin.Unit): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter f: () -> kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(() -> Unit): Unit'
|
||||
TRY type=kotlin.Unit
|
||||
try: BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'invoke(): Unit' type=kotlin.Unit origin=INVOKE
|
||||
$this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION
|
||||
CATCH parameter=e: Exception /* = Exception */
|
||||
VAR CATCH_PARAMETER val e: kotlin.Exception /* = java.lang.Exception */
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
THROW type=kotlin.Nothing
|
||||
GET_VAR 'e: Exception /* = Exception */' type=kotlin.Exception /* = java.lang.Exception */ origin=null
|
||||
Reference in New Issue
Block a user