This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,13 @@
|
||||
// The way out of a FOR EACH loop includes the case of no pass at all. A
|
||||
// checker that kept "X is in Xs" on the way out held FALSE after looping over
|
||||
// an empty list, and proved anything, even 1 == 2.
|
||||
// MUST-NOT-PROVE: assert@12
|
||||
DECLARE Xs : LIST OF INTEGER
|
||||
DECLARE S : INTEGER
|
||||
Xs <- []
|
||||
S <- 0
|
||||
FOR EACH X IN Xs
|
||||
S <- S + X
|
||||
NEXT X
|
||||
ASSERT 1 == 2
|
||||
OUTPUT S
|
||||
Reference in new issue
Block a user