Closed
Description
The following snippet generates an athrow
instruction if return
is used inside a nested block.
class Test {
def fun: Int = {
var a = 10;
{ // throw is generated only when return is nested
return a
}
}
}
This seems like e a backend issue and may not be related with how return expressions are translated (because NonLocalReturns
phase has no effect).