diff options
author | Rustan Leino <unknown> | 2016-02-26 13:46:25 -0800 |
---|---|---|
committer | Rustan Leino <unknown> | 2016-02-26 13:46:25 -0800 |
commit | 0531b8772f4174d807caecc356ecaa41adca8c8c (patch) | |
tree | d4de41e22112c1d043e477b2d4cc5efe4081cf81 /Test/dafny4/Bug138.dfy | |
parent | ad063dfd62db2b7f147e4f8abbcd7b8a7f575dae (diff) | |
parent | b3d6306759e450a5d004b6581e0bf3b891b93fa5 (diff) |
Merge
Diffstat (limited to 'Test/dafny4/Bug138.dfy')
-rw-r--r-- | Test/dafny4/Bug138.dfy | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/dafny4/Bug138.dfy b/Test/dafny4/Bug138.dfy new file mode 100644 index 00000000..db0e54ef --- /dev/null +++ b/Test/dafny4/Bug138.dfy @@ -0,0 +1,22 @@ +// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+datatype List = Nil | Cons(int, List)
+
+method R(xs: List)
+{
+ match xs
+ case Nil() => // currently produces a parsing error, but shouldn't
+ case Cons(x, Nil()) => // currently allowed
+ case Cons(x, Cons(y, tail)) =>
+}
+
+function F(xs: List) : int
+{
+ match xs
+ case Nil() => 0 // currently produces a parsing error, but shouldn't
+ case Cons(x, Nil()) => 1 // currently allowed
+ case Cons(x, Cons(y, tail)) => 2
+}
+
+
|