diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-23 10:26:47 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-23 10:26:47 -0700 |
commit | 1763ad8e4d6b631fe966b394ae2dbafa7d803627 (patch) | |
tree | 18bf26b129696e1218284b0f62400a0efe92f395 /Source/DafnyExtension/DafnyDriver.cs | |
parent | fb4915bc1b95d182b08a45c85d92046489ed1078 (diff) |
Fix: Visual studio did not show warnings.
To check if the fix works, try declaring a static top level function.
Initial work on this patch by Rustan
Diffstat (limited to 'Source/DafnyExtension/DafnyDriver.cs')
-rw-r--r-- | Source/DafnyExtension/DafnyDriver.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/DafnyExtension/DafnyDriver.cs b/Source/DafnyExtension/DafnyDriver.cs index 7f39fe34..8300213c 100644 --- a/Source/DafnyExtension/DafnyDriver.cs +++ b/Source/DafnyExtension/DafnyDriver.cs @@ -182,6 +182,13 @@ namespace DafnyLanguage dd.RecordError(tok.filename, tok.line - 1, tok.col - 1, ErrorCategory.ResolveError, s);
ErrorCount++;
}
+
+ public override void Warning(IToken tok, string msg, params object[] args) {
+ if (reportWarnings) {
+ string s = string.Format(msg, args);
+ dd.RecordError(tok.filename, tok.line - 1, tok.col - 1, ErrorCategory.ResolveWarning, s);
+ }
+ }
}
#endregion
|