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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 1395853004: FYI: add strong mode checking to error verifier's task (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: format Created 5 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 2d03aa7dbbae4b9e9c1bf8419166790ac196c61a..2d08a008d3be3bbc5fcc6ac8540c5ca3f75fd30e 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -20,7 +20,7 @@ import 'rules.dart';
class _OverrideChecker {
bool _failure = false;
final TypeRules _rules;
- final ErrorReporter _reporter;
+ final AnalysisErrorListener _reporter;
_OverrideChecker(this._rules, this._reporter);
@@ -318,14 +318,14 @@ class _OverrideChecker {
if (info == null) return;
var error = info.toAnalysisError();
if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
- _reporter.reportError(error);
+ _reporter.onError(error);
}
}
/// Checks the body of functions and properties.
class CodeChecker extends RecursiveAstVisitor {
final TypeRules rules;
- final ErrorReporter reporter;
+ final AnalysisErrorListener reporter;
final _OverrideChecker _overrideChecker;
bool _failure = false;
bool get failure => _failure || _overrideChecker._failure;
@@ -335,7 +335,7 @@ class CodeChecker extends RecursiveAstVisitor {
_overrideChecker._failure = false;
}
- CodeChecker(TypeRules rules, ErrorReporter reporter)
+ CodeChecker(TypeRules rules, AnalysisErrorListener reporter)
: rules = rules,
reporter = reporter,
_overrideChecker = new _OverrideChecker(rules, reporter);
@@ -918,13 +918,13 @@ class CodeChecker extends RecursiveAstVisitor {
DartType _getStaticType(Expression expr) {
var type = expr.staticType;
if (type == null) {
- reporter.reportError(new MissingTypeError(expr).toAnalysisError());
+ reporter.onError(new MissingTypeError(expr).toAnalysisError());
}
return type ?? rules.provider.dynamicType;
}
void _recordDynamicInvoke(AstNode node, AstNode target) {
- reporter.reportError(new DynamicInvoke(rules, node).toAnalysisError());
+ reporter.onError(new DynamicInvoke(rules, node).toAnalysisError());
// TODO(jmesserly): we may eventually want to record if the whole operation
// (node) was dynamic, rather than the target, but this is an easier fit
// with what we used to do.
@@ -935,7 +935,7 @@ class CodeChecker extends RecursiveAstVisitor {
if (info == null) return;
var error = info.toAnalysisError();
if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
- reporter.reportError(error);
+ reporter.onError(error);
if (info is CoercionInfo) {
// TODO(jmesserly): if we're run again on the same AST, we'll produce the
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698