diff options
author | Rustan Leino <leino@microsoft.com> | 2011-12-10 10:56:42 -0800 |
---|---|---|
committer | Rustan Leino <leino@microsoft.com> | 2011-12-10 10:56:42 -0800 |
commit | 933057e27e9310cd88e4a41ba3cf51bfeb74a226 (patch) | |
tree | 0e797d01a76e601a947d456676af037454ff7982 /Test/dafny0/SmallTests.dfy | |
parent | 12db5856187194c02424a5430e7195ad187b451e (diff) |
Dafny: fix bug in translation of (the splitting of) if-then-else expressions (see bug report Issue 10214 on codeplex)
Diffstat (limited to 'Test/dafny0/SmallTests.dfy')
-rw-r--r-- | Test/dafny0/SmallTests.dfy | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/dafny0/SmallTests.dfy b/Test/dafny0/SmallTests.dfy index 2074e484..041b51c1 100644 --- a/Test/dafny0/SmallTests.dfy +++ b/Test/dafny0/SmallTests.dfy @@ -402,3 +402,13 @@ class Test { }
}
+
+// ------ an if-then-else regression test
+
+function F(b: bool): int
+ // The if-then-else in the following line was once translated incorrectly,
+ // incorrectly causing the postcondition to verify
+ ensures if b then F(b) == 5 else F(b) == 6;
+{
+ 5
+}
|