| Index: pkg/analyzer/lib/src/context/cache.dart
|
| diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
|
| index 4535ca4ce1d4cea4079b9eafa45152bce0f267f5..4443dfaad38d423c09730c98fc92551fe97e4f19 100644
|
| --- a/pkg/analyzer/lib/src/context/cache.dart
|
| +++ b/pkg/analyzer/lib/src/context/cache.dart
|
| @@ -565,8 +565,8 @@ class CacheEntry {
|
| }
|
| // Invalidate results that depend on this result.
|
| _invalidateDependentResults(id, thisData, delta, level + 1);
|
| - // If empty, remove the entry altogether.
|
| - if (_resultMap.isEmpty) {
|
| + // If empty and not explicitly added, remove the entry altogether.
|
| + if (_resultMap.isEmpty && !explicitlyAdded) {
|
| _partition._targetMap.remove(target);
|
| _partition._removeIfSource(target);
|
| }
|
|
|