diff options
author | Unknown <leino@LEINO6.redmond.corp.microsoft.com> | 2012-08-14 15:42:25 -0700 |
---|---|---|
committer | Unknown <leino@LEINO6.redmond.corp.microsoft.com> | 2012-08-14 15:42:25 -0700 |
commit | 91826b66ee694463fcbb0005cfa23f746f8ebb82 (patch) | |
tree | df24e0e647a4b771ff27dd40f11f89d86c57d837 /Source/Dafny | |
parent | ae9f8b1f4e149106710b13032cfa671755b15a30 (diff) |
Dafny: two bug fixes (resolution crashing on bad input, DafnyExtension crashing after certain deletes)
Diffstat (limited to 'Source/Dafny')
-rw-r--r-- | Source/Dafny/Resolver.cs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs index 6534d2ba..bf6dce17 100644 --- a/Source/Dafny/Resolver.cs +++ b/Source/Dafny/Resolver.cs @@ -964,17 +964,19 @@ namespace Microsoft.Dafny allTypeParameters.PopMarker();
}
- foreach (TopLevelDecl d in declarations) {
- if (d is ClassDecl) {
- foreach (var member in ((ClassDecl)d).Members) {
- if (member is Method) {
- var m = ((Method)member);
- if (m.Body != null)
- CheckTypeInference(m.Body);
- } else if (member is Function) {
- var f = (Function)member;
- if (f.Body != null)
- CheckTypeInference(f.Body);
+ if (ErrorCount == prevErrorCount) {
+ foreach (TopLevelDecl d in declarations) {
+ if (d is ClassDecl) {
+ foreach (var member in ((ClassDecl)d).Members) {
+ if (member is Method) {
+ var m = ((Method)member);
+ if (m.Body != null)
+ CheckTypeInference(m.Body);
+ } else if (member is Function) {
+ var f = (Function)member;
+ if (f.Body != null)
+ CheckTypeInference(f.Body);
+ }
}
}
}
|