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
If you have a specification { after init { ... } } containing assertions and also an implementation { after init { ... } } containing actions, you can assert false in the specification { after init { ... } } if the other assertions in specification { after init { ... } } relate to the result of actions in implementation { after init { ... } }.
Steps to reproduce
Put the following in oops.ivy.
#lang ivy1.7
individual x:bool
specification {
after init {
assert x = true;
assert false;
}
}
implementation {
after init {
x := true;
}
}
Check the file with the following command.
$ ivy_check trace=true oops.ivy
Expected: Line 8 assert false; should fail.
Actual: Whole file passes.
Removing line 7 assert x = true; or removing line 17 x := true; fixes the issue (line 8 assert false; fails). Additionally, moving both the asserts and the actions into a single after init { ... }outside of either specification { ... } and implementation { ... } resolves the issue.
Present in versions
On kenmcmil/ivy@dbe45e7 on macOS Sonoma.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Summary
If you have a
specification { after init { ... } }
containing assertions and also animplementation { after init { ... } }
containing actions, you canassert false
in thespecification { after init { ... } }
if the other assertions inspecification { after init { ... } }
relate to the result of actions inimplementation { after init { ... } }
.Steps to reproduce
Put the following in
oops.ivy
.Check the file with the following command.
assert false;
should fail.Removing line 7
assert x = true;
or removing line 17x := true;
fixes the issue (line 8assert false;
fails). Additionally, moving both the asserts and the actions into a singleafter init { ... }
outside of eitherspecification { ... }
andimplementation { ... }
resolves the issue.Present in versions
On
kenmcmil/ivy
@dbe45e7
on macOS Sonoma.The text was updated successfully, but these errors were encountered: