summaryrefslogtreecommitdiff
path: root/Test/dafny4
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-04-17 15:22:24 -0700
committerGravatar qunyanm <unknown>2015-04-17 15:22:24 -0700
commitd248da33b7763b8c3b2ef75ece9612a45182e7b0 (patch)
treefc7d59235c8ec55510ea18d8be3b579b38c3a481 /Test/dafny4
parente4419c2e8d5469787f997fbf0e74f9ef8383c140 (diff)
Fix issue #69. If we can't find a member in classMembers, search the static
members of the enclosing module or its imports.
Diffstat (limited to 'Test/dafny4')
-rw-r--r--Test/dafny4/Bug69.dfy14
-rw-r--r--Test/dafny4/Bug69.dfy.expect2
2 files changed, 16 insertions, 0 deletions
diff --git a/Test/dafny4/Bug69.dfy b/Test/dafny4/Bug69.dfy
new file mode 100644
index 00000000..638a897c
--- /dev/null
+++ b/Test/dafny4/Bug69.dfy
@@ -0,0 +1,14 @@
+// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+module M1
+{
+ predicate X(i:int)
+}
+
+module M2
+{
+ import opened M1
+ predicate P(i:int) requires X(i) { true } // ok
+ predicate{:opaque} O(i:int) requires X(i) { true } // resolution/type error: X does not exist
+} \ No newline at end of file
diff --git a/Test/dafny4/Bug69.dfy.expect b/Test/dafny4/Bug69.dfy.expect
new file mode 100644
index 00000000..73ba063c
--- /dev/null
+++ b/Test/dafny4/Bug69.dfy.expect
@@ -0,0 +1,2 @@
+
+Dafny program verifier finished with 4 verified, 0 errors