We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
old
In the following snippet, Stainless complains that the old in inner1 may only occur in postcondition, even though that's the case:
inner1
import stainless.lang.* object OldInInnerFn { case class A(var i: BigInt) def outer1(a: A): Unit = { def inner1(a: A): Unit = { () }.ensuring(_ => a.i == old(a).i) // "Stainless `old` can only occur in postconditions" } // This is ok def outer2(a: A): Unit = { def inner2(): Unit = { }.ensuring(_ => a.i == old(a).i) } }
It seems to happen in the particular case where the variables are untouched.
The text was updated successfully, but these errors were encountered:
Fix epfl-lara#1530
59c5e97
Fix #1530 (#1532) allow using old in ensuring of inner functions ev…
ab2bb07
…en if variable is unchanged Co-authored-by: Viktor Kunčak <vkuncak@users.noreply.github.com>
mario-bucev
Successfully merging a pull request may close this issue.
In the following snippet, Stainless complains that the
old
ininner1
may only occur in postcondition, even though that's the case:It seems to happen in the particular case where the variables are untouched.
The text was updated successfully, but these errors were encountered: