| 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 30cd4d098aa0c688754898e0d9933c0ff0895bc8..66f73924fecb83ce530fc67f74e54ad81708670d 100644
|
| --- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| +++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
|
| @@ -228,28 +228,34 @@ class DartWorkManager implements WorkManager {
|
| }
|
| // Update notice.
|
| if (_isDartSource(target)) {
|
| - bool hasErrorResult = false;
|
| + bool shouldSetErrors = false;
|
| outputs.forEach((ResultDescriptor descriptor, value) {
|
| if (descriptor == PARSED_UNIT && value != null) {
|
| context.getNotice(target).parsedDartUnit = value;
|
| + shouldSetErrors = true;
|
| + }
|
| + if (_isErrorResult(descriptor)) {
|
| + shouldSetErrors = true;
|
| }
|
| - hasErrorResult = hasErrorResult || _isErrorResult(descriptor);
|
| });
|
| - if (hasErrorResult) {
|
| + if (shouldSetErrors) {
|
| AnalysisErrorInfo info = getErrors(target);
|
| context.getNotice(target).setErrors(info.errors, info.lineInfo);
|
| }
|
| }
|
| if (target is LibrarySpecificUnit) {
|
| Source source = target.source;
|
| - bool hasErrorResult = false;
|
| + bool shouldSetErrors = false;
|
| outputs.forEach((ResultDescriptor descriptor, value) {
|
| if (descriptor == RESOLVED_UNIT && value != null) {
|
| context.getNotice(source).resolvedDartUnit = value;
|
| + shouldSetErrors = true;
|
| + }
|
| + if (_isErrorResult(descriptor)) {
|
| + shouldSetErrors = true;
|
| }
|
| - hasErrorResult = hasErrorResult || _isErrorResult(descriptor);
|
| });
|
| - if (hasErrorResult) {
|
| + if (shouldSetErrors) {
|
| AnalysisErrorInfo info = getErrors(source);
|
| context.getNotice(source).setErrors(info.errors, info.lineInfo);
|
| }
|
|
|