Counterexample variable appears before is declaration #5921
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: counterexamples
Counterexample generation
Dafny version
4.9.0
Code to produce this issue
Command to run and resulting output
What happened?
In this function, the assertion
assert y != 2
on line 4 does not hold. Its counterexample says that0 == h
at line 2, which is beforeh
is declared at line 5.Surprisingly, if the method is simplified in any way (remove more statements, simplify expressions, remove
ensures
, removeif *
, ...), the issue disappears and0 == h
is not reported any more at line 2.What type of operating system are you experiencing the problem on?
Linux, Mac
The text was updated successfully, but these errors were encountered: