Skip to content

Commit 491f4f4

Browse files
bwilkersonCommit Queue
authored andcommitted
[CQ] Remove dead code from ElementLocationImpl
Change-Id: I44ca6362926419d2065b6b6a7045d87a37eff478 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403622 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 6254583 commit 491f4f4

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,39 +3466,6 @@ class ElementLocationImpl implements ElementLocation {
34663466
_components = _decode(encoding);
34673467
}
34683468

3469-
/// Initialize a newly created location from the given [components].
3470-
ElementLocationImpl.con3(List<String> components) {
3471-
_components = components;
3472-
}
3473-
3474-
/// Initialize a newly created location to represent the given [element].
3475-
ElementLocationImpl.fromElement(Element2 element) {
3476-
List<String> components = <String>[];
3477-
Element2? ancestor = element;
3478-
while (ancestor != null) {
3479-
if (ancestor is! ElementImpl2) {
3480-
if (ancestor is LibraryElementImpl) {
3481-
components.insert(0, ancestor.identifier);
3482-
} else if (ancestor is AugmentableElement) {
3483-
components.insert(0, ancestor.identifier);
3484-
} else {
3485-
throw '${ancestor.runtimeType} is not an ElementImpl2';
3486-
}
3487-
ancestor = ancestor.enclosingElement2;
3488-
} else {
3489-
components.insert(0, ancestor.identifier);
3490-
if (ancestor is LocalFunctionElementImpl) {
3491-
ancestor = (ancestor.wrappedElement._enclosingElement3
3492-
as ExecutableElementImpl)
3493-
.element;
3494-
} else {
3495-
ancestor = ancestor.enclosingElement2;
3496-
}
3497-
}
3498-
}
3499-
_components = components.toFixedList();
3500-
}
3501-
35023469
@override
35033470
List<String> get components => _components;
35043471

0 commit comments

Comments
 (0)