You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the way Dafny resolves multi-assignment, I just disabled multiple-right-hand-side assignment to linear variables for soundness's sake. Multiple assignment from method calls still works, so you can do:
method Assign2<A, B>(linear a: A, linear b: B) returns(linear a': A, linear b': B)
ensures a' == a;
ensures b' == b;
{
a' := a;
b' := b;
}
method f(linear x: int, linear y: int) returns (linear x': int, linear y': int)
{
x' := x;
y' := y;
x', y' := Assign2(y', x');
}
Right now, Dafny lets this pass:
but not this:
It should be the other way around.
The text was updated successfully, but these errors were encountered: