From 74d1631a4724739dbb897c74713f54c4d060e781 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Fri, 5 Feb 2016 15:18:29 -0800 Subject: Fix issue 125. Add the missing case 2 and 3 with refinement and opened imports. For the following situation module LibA { // ...things declared here... } MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit module LibB { // ...things declared here... } module R { import opened LibA // ...things declared here... } module S refines R { import opened LibB // ...declared here... } 1. If module R declares a TopLevelDecl “G”, then we should report an error if S attempts to declare an incompatible TopLevelDecl “G”. Dafny does this already. 2. If LibA declares a TopLevelDecl “G” but R does not directly declare any TopLevelDecl G”, then we should also issue an error for any TopLevelDecl “G” in S. This behavior is missing in Dafny. 3. If each of LibA and LibB declares some TopLevelDecl “G”, but neither R nor S directly declares any TopLevelDecl “G”, then no error should be issued, and any use of “G” in S should resolve to the “G” in LibA. This behavior is missing in Dafny. --- Test/dafny4/Bug125.dfy.expect | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Test/dafny4/Bug125.dfy.expect (limited to 'Test/dafny4/Bug125.dfy.expect') diff --git a/Test/dafny4/Bug125.dfy.expect b/Test/dafny4/Bug125.dfy.expect new file mode 100644 index 00000000..c87e2af2 --- /dev/null +++ b/Test/dafny4/Bug125.dfy.expect @@ -0,0 +1,2 @@ + +Dafny program verifier finished with 10 verified, 0 errors -- cgit v1.2.3