Skip to content

Commit

Permalink
second commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shazqadeer committed Dec 2, 2024
1 parent f01a4b9 commit 4fa978c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Source/Core/AST/AbsyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1678,8 +1678,8 @@ public override Type ResolveType(ResolutionContext rc)
}

// otherwise: this name is not declared anywhere
rc.Error(this, "undeclared type: {0}", Name);
return Type.Bool; // resolve to "bool" type so that type resolution can continue safely
rc.Error(this, "undeclared type: {0} (replacing with \"bool\" to continue resolving)", Name);
return Type.Bool;
}

private List<Type> ResolveArguments(ResolutionContext rc)
Expand Down
6 changes: 3 additions & 3 deletions Test/test0/Types1.bpl.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Types1.bpl(8,11): Error: undeclared type: x
Types1.bpl(9,11): Error: undeclared type: x
Types1.bpl(9,14): Error: undeclared type: x
Types1.bpl(8,11): Error: undeclared type: x (replacing with "bool" to continue resolving)
Types1.bpl(9,11): Error: undeclared type: x (replacing with "bool" to continue resolving)
Types1.bpl(9,14): Error: undeclared type: x (replacing with "bool" to continue resolving)
3 name resolution errors detected in Types1.bpl
4 changes: 2 additions & 2 deletions Test/test20/Prog0.bpl.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Prog0.bpl(19,10): Error: type variable must occur in map arguments: a
Prog0.bpl(31,27): Error: more than one declaration of type variable: beta
Prog0.bpl(34,22): Error: undeclared type: alpha
Prog0.bpl(35,35): Error: undeclared type: alpha
Prog0.bpl(34,22): Error: undeclared type: alpha (replacing with "bool" to continue resolving)
Prog0.bpl(35,35): Error: undeclared type: alpha (replacing with "bool" to continue resolving)
4 name resolution errors detected in Prog0.bpl
4 changes: 2 additions & 2 deletions Test/test20/TypeDecls0.bpl.expect
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ TypeDecls0.bpl(15,12): Error: more than one declaration of type variable: a
TypeDecls0.bpl(16,18): Error: more than one declaration of type variable: a
TypeDecls0.bpl(20,17): Error: type variable must occur in map arguments: b
TypeDecls0.bpl(24,9): Error: type constructor received wrong number of arguments: C
TypeDecls0.bpl(26,9): Error: undeclared type: A0
TypeDecls0.bpl(27,9): Error: undeclared type: F
TypeDecls0.bpl(26,9): Error: undeclared type: A0 (replacing with "bool" to continue resolving)
TypeDecls0.bpl(27,9): Error: undeclared type: F (replacing with "bool" to continue resolving)
TypeDecls0.bpl(30,9): Error: type constructor received wrong number of arguments: E
TypeDecls0.bpl(32,9): Error: type constructor received wrong number of arguments: E
TypeDecls0.bpl(34,9): Error: type constructor received wrong number of arguments: E
Expand Down

0 comments on commit 4fa978c

Please sign in to comment.