diff options
author | leino <unknown> | 2015-10-05 08:59:16 -0700 |
---|---|---|
committer | leino <unknown> | 2015-10-05 08:59:16 -0700 |
commit | 27120ddc7adb3a0c789c1ee784d73a4be08de118 (patch) | |
tree | 7f97308b82f9a829d4338e177e31713b8c10a803 /Test/dafny0/ResolutionErrors.dfy | |
parent | e07d86d6cc4423703dbfb479f09b44c80f877ef9 (diff) |
Implemented resolution, verification, and (poorly performing) compilation of existential if guards.
Fixed bugs in ghost checks involving comprehensions and attributes.
Added SubstituteBoundedPool method.
Diffstat (limited to 'Test/dafny0/ResolutionErrors.dfy')
-rw-r--r-- | Test/dafny0/ResolutionErrors.dfy | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/dafny0/ResolutionErrors.dfy b/Test/dafny0/ResolutionErrors.dfy index e935c83d..58ba6701 100644 --- a/Test/dafny0/ResolutionErrors.dfy +++ b/Test/dafny0/ResolutionErrors.dfy @@ -1692,3 +1692,23 @@ module LoopResolutionTests { }
}
}
+
+module UnderspecifiedTypesInAttributes {
+ function method P<T>(x: T): int
+ method M() {
+ var {:myattr var u :| true; 6} v: int; // error: type of u is underspecified
+ var j {:myattr var u :| true; 6} :| 0 <= j < 100; // error: type of u is underspecified
+
+ var a := new int[100];
+ forall lp {:myattr var u :| true; 6} | 0 <= lp < 100 { // error: type of u is underspecified
+ a[lp] := 0;
+ }
+
+ modify {:myattr P(10)} {:myattr var u :| true; 6} a; // error: type of u is underspecified
+
+ calc {:myattr P(10)} {:myattr var u :| true; 6} // error: type of u is underspecified
+ {
+ 5;
+ }
+ }
+}
|