java2xtend
java2xtend copied to clipboard
Method arguments are getting reassigned in xtend code
public class Test {
public void m(int arg) {
arg = 5;
System.out.println(arg);
}
}
generates
class Test {
def m( int arg){
arg=5
println(arg)
}
}
which fails at assignment of 5 to arg. Solution would be to create artificial variable at the very start of method, rename method arg to _arg and then use variable later in the method (of course, only if this is needed, too much visual noise otherwise)