summaryrefslogtreecommitdiff
path: root/Source/Dafny/Parser.cs
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2014-10-27 13:19:20 -0700
committerGravatar Bryan Parno <parno@microsoft.com>2014-10-27 13:19:20 -0700
commit29c8ee79b916f15e1c4b46e09e43153b990cddcc (patch)
tree455b3b9ce5023875b619263cf3858895a843aeb8 /Source/Dafny/Parser.cs
parentda78eefe44700c19ef3b3b5ee245899b35109e12 (diff)
Even with noCheating enabled, don't check included files or methods marked with :decl or :imported
Diffstat (limited to 'Source/Dafny/Parser.cs')
-rw-r--r--Source/Dafny/Parser.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index ca13a01e..db32e726 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -967,7 +967,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
if (la.kind == 15) {
FunctionBody(out body, out bodyStart, out bodyEnd);
}
- if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom")) {
+ if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom") && !Attributes.Contains(attrs, "imported")) {
SemErr(t, "a function with an ensures clause must have a body, unless given the :axiom attribute");
}
@@ -1089,7 +1089,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
if (la.kind == 15) {
BlockStmt(out body, out bodyStart, out bodyEnd);
}
- if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom")) {
+ if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom") && !Attributes.Contains(attrs, "imported") && !Attributes.Contains(attrs, "decl") && theVerifyThisFile) {
SemErr(t, "a method with an ensures clause must have a body, unless given the :axiom attribute");
}