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

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

Issue 1179253002: Mix VARIABLE_REFERENCE_ERRORS into the full errors list on ChangeNotice. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Return DART_ERRORS from getErrors() when valid. 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
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index 0654e3c6bcc757819dc4c17a5409f48de877e651..6e7ba5b50ad74a02732252d74f1254861d8f1cdc 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -46,6 +46,7 @@ class DartWorkManager implements WorkManager {
HINTS,
RESOLVE_REFERENCES_ERRORS,
RESOLVE_TYPE_NAMES_ERRORS,
+ VARIABLE_REFERENCE_ERRORS,
VERIFY_ERRORS
];
@@ -179,6 +180,11 @@ class DartWorkManager implements WorkManager {
* errors in the source. The errors contained in the list can be incomplete.
*/
AnalysisErrorInfo getErrors(Source source) {
+ if (analysisCache.getState(source, DART_ERRORS) == CacheState.VALID) {
+ List<AnalysisError> errors = analysisCache.getValue(source, DART_ERRORS);
+ LineInfo lineInfo = analysisCache.getValue(source, LINE_INFO);
+ return new AnalysisErrorInfoImpl(errors, lineInfo);
+ }
List<AnalysisError> errors = <AnalysisError>[];
for (ResultDescriptor descriptor in _SOURCE_ERRORS) {
errors.addAll(analysisCache.getValue(source, descriptor));
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698