| 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));
|
|
|