Skip to content

Commit d400676

Browse files
authored
Remove some usages of analyzer private types and APIs (#4020)
1 parent c41b86b commit d400676

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/src/model/canonicalization.dart

+2-8
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,15 @@ final class _Canonicalization {
9292
Element2? ancestor = element;
9393
while (ancestor != null) {
9494
if (ancestor is! ElementImpl2) {
95-
if (ancestor is LibraryElementImpl) {
95+
if (ancestor is LibraryElement2) {
9696
components.insert(0, ancestor.identifier);
9797
} else {
9898
throw Exception('${ancestor.runtimeType} is not an ElementImpl2');
9999
}
100100
ancestor = ancestor.enclosingElement2;
101101
} else {
102102
components.insert(0, ancestor.identifier);
103-
if (ancestor is LocalFunctionElementImpl) {
104-
ancestor = (ancestor.wrappedElement.enclosingElement2
105-
as ExecutableElementImpl)
106-
.element;
107-
} else {
108-
ancestor = ancestor.enclosingElement2;
109-
}
103+
ancestor = ancestor.enclosingElement2;
110104
}
111105
}
112106
var buffer = StringBuffer();

0 commit comments

Comments
 (0)