summaryrefslogtreecommitdiff
path: root/Source/Dafny/Resolver.cs
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-01-03 00:41:35 -0800
committerGravatar leino <unknown>2015-01-03 00:41:35 -0800
commiteaf920c4580d2e2ffb5ad4ba3bf21c820ff3f085 (patch)
tree985581ae03731b94d05a492afbbd504af68085b7 /Source/Dafny/Resolver.cs
parentbcb2910254f5e108e65f8f6ff5ab4efe03728f6c (diff)
parentc332e0e3e198940c8566f4a8e1985904956fc808 (diff)
Merge
Diffstat (limited to 'Source/Dafny/Resolver.cs')
-rw-r--r--Source/Dafny/Resolver.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index f1e0f315..23f6bc6c 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -4879,7 +4879,7 @@ namespace Microsoft.Dafny
if (e is WildcardExpr) {
if (bodyMustBeSpecOnly) {
Error(e, "'decreases *' is not allowed on ghost loops");
- } else if (!codeContext.AllowsNontermination) {
+ } else if (!codeContext.AllowsNontermination && !DafnyOptions.O.Dafnycc) {
Error(e, "a possibly infinite loop is allowed only if the enclosing method is declared (with 'decreases *') to be possibly non-terminating");
}
}
@@ -4931,7 +4931,7 @@ namespace Microsoft.Dafny
if (e is WildcardExpr) {
if (s.IsGhost) {
Error(e, "'decreases *' is not allowed on ghost loops");
- } else if (!codeContext.AllowsNontermination) {
+ } else if (!codeContext.AllowsNontermination && !DafnyOptions.O.Dafnycc) {
Error(e, "a possibly infinite loop is allowed only if the enclosing method is declared (with 'decreases *') to be possibly non-terminating");
}
}