summaryrefslogtreecommitdiff
path: root/Source/Dafny/Resolver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/Resolver.cs')
-rw-r--r--Source/Dafny/Resolver.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index 44990d7d..e977dbd5 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -24,9 +24,7 @@ namespace Microsoft.Dafny
Contract.Requires(msg != null);
ConsoleColor col = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine("{0}({1},{2}): Error: {3}",
- DafnyOptions.Clo.UseBaseNameForFileName ? System.IO.Path.GetFileName(tok.filename) : tok.filename, tok.line, tok.col - 1,
- string.Format(msg, args));
+ Dafny.Util.ReportIssue("Error", tok, msg, args);
Console.ForegroundColor = col;
ErrorCount++;
}
@@ -66,9 +64,7 @@ namespace Microsoft.Dafny
if (reportWarnings) {
ConsoleColor col = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
- Console.WriteLine("{0}({1},{2}): Warning: {3}",
- DafnyOptions.Clo.UseBaseNameForFileName ? System.IO.Path.GetFileName(tok.filename) : tok.filename, tok.line, tok.col - 1,
- string.Format(msg, args));
+ Dafny.Util.ReportIssue("Warning", tok, msg, args);
Console.ForegroundColor = col;
}
}
@@ -281,9 +277,7 @@ namespace Microsoft.Dafny
}
public static void DefaultInformationReporter(AdditionalInformation info) {
- Console.WriteLine("{0}({1},{2}): Info: {3}",
- DafnyOptions.Clo.UseBaseNameForFileName ? System.IO.Path.GetFileName(info.Token.filename) : info.Token.filename,
- info.Token.line, info.Token.col - 1, info.Text);
+ Dafny.Util.ReportIssue("Info", info.Token, info.Text);
}
public void ResolveProgram(Program prog) {
@@ -4497,6 +4491,10 @@ namespace Microsoft.Dafny
// something is wrong; either aa or bb wasn't properly resolved, or they don't unify
return false;
}
+ } else if (a is Resolver_IdentifierExpr.ResolverType_Type) {
+ return b is Resolver_IdentifierExpr.ResolverType_Type;
+ } else if (a is Resolver_IdentifierExpr.ResolverType_Module) {
+ return b is Resolver_IdentifierExpr.ResolverType_Module;
} else {
Contract.Assert(false); throw new cce.UnreachableException(); // unexpected type
}