| Index: pkg/analyzer/lib/src/generated/engine.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
|
| index 8abf615850530429274e00c1538ba41738ec9336..c44d54349a93cc028b2b70414fa0d1275f5b95ac 100644
|
| --- a/pkg/analyzer/lib/src/generated/engine.dart
|
| +++ b/pkg/analyzer/lib/src/generated/engine.dart
|
| @@ -5091,10 +5091,14 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| if (librarySources.length != 1) {
|
| return false;
|
| }
|
| - // do resolution
|
| + // prepare the existing unit
|
| Source librarySource = librarySources[0];
|
| CompilationUnit oldUnit =
|
| getResolvedCompilationUnit2(unitSource, librarySource);
|
| + if (oldUnit == null) {
|
| + return false;
|
| + }
|
| + // do resolution
|
| PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver(
|
| typeProvider,
|
| unitSource,
|
| @@ -5107,7 +5111,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| // prepare notice
|
| ChangeNoticeImpl notice = _getNotice(unitSource);
|
| notice.compilationUnit = oldUnit;
|
| - // TODO(scheglov) apply updated errors
|
| + // apply updated errors
|
| {
|
| LineInfo lineInfo = getLineInfo(unitSource);
|
| notice.setErrors(dartEntry.allErrors, lineInfo);
|
|
|