Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: tests/compiler/dart2js/analyze_helper.dart

Issue 140803002: Perform override and inheritance checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index 47deb90bd118d596fa4572fe52d408c5abcfb1b9..585468ae7083f08b8860041dcc38559d49681b5f 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -30,6 +30,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
bool hasWarnings = false;
bool hasHint = false;
bool hasErrors = false;
+ bool lastWasWhitelisted = false;
karlklose 2014/01/28 12:27:45 It would be nice if Infos carried a reference to t
Johnni Winther 2014/01/31 12:29:30 Added a TODO.
Map<String, Map<String, int>> whiteListMap
= new Map<String, Map<String, int>>();
@@ -99,6 +100,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (kind == api.Diagnostic.WARNING) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted warnings.
+ lastWasWhitelisted = true;
return;
}
hasWarnings = true;
@@ -106,6 +108,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (kind == api.Diagnostic.HINT) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted hints.
+ lastWasWhitelisted = true;
return;
}
hasHint = true;
@@ -113,10 +116,15 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (kind == api.Diagnostic.ERROR) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted errors.
+ lastWasWhitelisted = true;
return;
}
hasErrors = true;
}
+ if (kind == api.Diagnostic.INFO && lastWasWhitelisted) {
+ return;
+ }
+ lastWasWhitelisted = false;
super.diagnosticHandler(uri, begin, end, message, kind);
}
}

Powered by Google App Engine
This is Rietveld 408576698