summaryrefslogtreecommitdiff
path: root/Test/dafny0/Simple.dfy
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-10-03 02:40:41 -0700
committerGravatar leino <unknown>2015-10-03 02:40:41 -0700
commite07d86d6cc4423703dbfb479f09b44c80f877ef9 (patch)
treef2300210ce0d45f889108e149bbee7a45b401e54 /Test/dafny0/Simple.dfy
parentcfe05df94a5ccb6025c94bd21b09bfc1240de756 (diff)
Parsing and pretty printing of the new "existential guards" of the two kinds of "if" statements.
Diffstat (limited to 'Test/dafny0/Simple.dfy')
-rw-r--r--Test/dafny0/Simple.dfy27
1 files changed, 27 insertions, 0 deletions
diff --git a/Test/dafny0/Simple.dfy b/Test/dafny0/Simple.dfy
index f7bfcb70..0b6a620e 100644
--- a/Test/dafny0/Simple.dfy
+++ b/Test/dafny0/Simple.dfy
@@ -74,3 +74,30 @@ class CF {
static protected function method I(): real
protected static predicate method J()
}
+
+// test printing of various if statements, including with omitted guards
+module A {
+ method P(x: int, y: int) {
+ if x==2 {
+ } else if * {
+ }
+ if x==10 {
+ }
+ if y==0 {
+ } else if y==1 {
+ } else if * {
+ } else if y==2 {
+ } else if (*) {
+ } else if y == 3 {
+ } else {
+ }
+ }
+}
+module B refines A {
+ method P... {
+ if ... {
+ } else if x==3 {
+ }
+ ...;
+ }
+}