summaryrefslogtreecommitdiff
path: root/Test/dafny4/Bug120.dfy
diff options
context:
space:
mode:
Diffstat (limited to 'Test/dafny4/Bug120.dfy')
-rw-r--r--Test/dafny4/Bug120.dfy11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/dafny4/Bug120.dfy b/Test/dafny4/Bug120.dfy
new file mode 100644
index 00000000..73553f2a
--- /dev/null
+++ b/Test/dafny4/Bug120.dfy
@@ -0,0 +1,11 @@
+// RUN: %dafny /compile:0 /noNLarith "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+function G(n: nat): nat
+{
+ if n == 0 then 5 else G(n-1)
+}
+
+method Test() {
+ assert G(10) == 5;
+} \ No newline at end of file