summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2015-01-08 13:20:04 -0800
committerGravatar Bryan Parno <parno@microsoft.com>2015-01-08 13:20:04 -0800
commitb3317185acc805116fa6716a70d57bd147f2229f (patch)
treead542679f46dfa48ea361626d466f6b8a62587ef
parentb09206df1a298d56fca3bec95baab41b7f670731 (diff)
Check the AllowGlobals flag in one additional location to avoid a contract failure
-rw-r--r--Source/Dafny/Resolver.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index 23f6bc6c..c7f452f6 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -1020,7 +1020,7 @@ namespace Microsoft.Dafny
}
if (cl.IsDefaultClass) {
foreach (MemberDecl m in cl.Members) {
- Contract.Assert(!m.HasStaticKeyword); // note, the IsStatic value isn't available yet; when it becomes available, we expect it will have the value 'true'
+ Contract.Assert(!m.HasStaticKeyword || DafnyOptions.O.AllowGlobals); // note, the IsStatic value isn't available yet; when it becomes available, we expect it will have the value 'true'
if (m is Function || m is Method) {
sig.StaticMembers[m.Name] = m;
}