From e07d86d6cc4423703dbfb479f09b44c80f877ef9 Mon Sep 17 00:00:00 2001 From: leino Date: Sat, 3 Oct 2015 02:40:41 -0700 Subject: Parsing and pretty printing of the new "existential guards" of the two kinds of "if" statements. --- Test/dafny0/Simple.dfy | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Test/dafny0/Simple.dfy') 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 { + } + ...; + } +} -- cgit v1.2.3