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

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

Issue 1174763002: Use ConstantVerifier in VerifyUnitTask. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | 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/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 7ec2d0ea93a17e9fdb75cfd30040f2405a504d85..15684b4da87df72201d9f7ee33b13bc852ab7666 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -3253,10 +3253,10 @@ class VerifyUnitTask extends SourceBasedAnalysisTask {
RecordingErrorListener errorListener = new RecordingErrorListener();
Source source = getRequiredSource();
errorReporter = new ErrorReporter(errorListener, source);
- TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
//
// Prepare inputs.
//
+ TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
CompilationUnit unit = getRequiredInput(UNIT_INPUT);
CompilationUnitElement unitElement = unit.element;
LibraryElement libraryElement = unitElement.library;
@@ -3271,6 +3271,12 @@ class VerifyUnitTask extends SourceBasedAnalysisTask {
libraryElement, typeProvider, new InheritanceManager(libraryElement));
unit.accept(errorVerifier);
//
+ // Use the ConstantVerifier to compute errors.
+ //
+ ConstantVerifier constantVerifier = new ConstantVerifier(
+ errorReporter, libraryElement, typeProvider, context.declaredVariables);
+ unit.accept(constantVerifier);
+ //
// Record outputs.
//
outputs[VERIFY_ERRORS] = errorListener.errors;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698