Skip to content

Commit

Permalink
Fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelMayer committed Nov 8, 2022
1 parent 944c359 commit 4ce0a00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/DafnyCore/Resolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2750,7 +2750,11 @@ public void ResolveTopLevelDecls_Core(List<TopLevelDecl/*!*/>/*!*/ declarations,
if (field.Rhs != null) {
var ec = reporter.Count(ErrorLevel.Error);
scope.PushMarker();
scope.AllowInstance = currentClass is ClassDecl cd && !cd.IsDefaultClass;
if ((currentClass is ClassDecl cd && !cd.IsDefaultClass) || currentClass is DatatypeDecl ||
currentClass is OpaqueTypeDecl) {
} else {
scope.AllowInstance = false;
}
ResolveExpression(field.Rhs, resolutionContext);
scope.PopMarker();
if (reporter.Count(ErrorLevel.Error) == ec) {
Expand Down

0 comments on commit 4ce0a00

Please sign in to comment.