extends mutates fun inc(self: Int) {
self += 1;
}
const C1: Int = 42;
contract Test {
get fun foo(): Int {
42.inc(); // this is fine
C1.inc(); // <---- produces FunC compilation error
return 42;
}
}
fails to compile with the following error message:
error: lvalue expected before `~$Int$_fun_inc`
42~$Int$_fun_inc();
It seems to me a not_mut wrapper does not get applied in this case.
fails to compile with the following error message:
It seems to me a
not_mut
wrapper does not get applied in this case.