Closed
Description
For this code:
object C {
def fun: Int = {
var a = 10
inline def f(arg: => Unit) = {
a += 1
arg
}
f {
return a
}
a
}
}
The decompiled code looks like this:
public final class C$ {
public static final C$ MODULE$;
static {
new C$();
}
public C$() {
MODULE$ = this;
}
public int fun() {
IntRef a = IntRef.create(10);
int var2 = a.elem + 1;
a.elem = var2;
return a.elem;
}
private void f$1(IntRef a$1, Function0 arg) {
int var3 = a$1.elem + 1;
a$1.elem = var3;
arg.apply();
}
}
a
should not be boxed