key
key copied to clipboard
Assignable does not work correctly with Boxed types
Description
I was testing other basic cases and came across this problem, I didn't seem to find any issue that had already been reported.
@ assignable \nothing;
should allow modification of a Boxed Type passed in parameter of a method.
Steps to reproduce
//@ ensures \result == 4;
//@ assignable \nothing;
public int computeA(Integer a) {
a = 4; // OK a is passed by value
return a;
}
What is your expected behavior and what was the actual behavior?
The proof doesn't succeed but it should work because, like String, Boxed types are immutable.