Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
index fc8c86022a9bbf20183d4af44943a73f0bb9df01..9f4e41939e59f2d3603ee4fe6452943b01a72071 100644 |
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart |
@@ -2087,6 +2087,22 @@ class _ElementOffsetUpdater extends GeneralizingElementVisitor { |
} |
} |
} |
+ // code range |
+ if (element is ElementImpl) { |
+ int oldOffset = element.codeOffset; |
+ int oldLength = element.codeLength; |
+ if (oldOffset != null) { |
+ int newOffset = oldOffset; |
+ int newLength = oldLength; |
+ newOffset += oldOffset > updateOffset ? updateDelta : 0; |
+ if (oldOffset <= updateOffset && updateOffset < oldOffset + oldLength) { |
+ newLength += updateDelta; |
+ } |
+ if (newOffset != oldOffset || newLength != oldLength) { |
+ element.setCodeRange(newOffset, newLength); |
+ } |
+ } |
+ } |
// visible range |
if (element is LocalElement) { |
SourceRange visibleRange = element.visibleRange; |