Skip to content

Commit bd2b050

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Search for extension getter/method/setter using FindElement.
[email protected], [email protected] Change-Id: Ifa4cb6ac3ab43ae473807f19488871678247f974 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110134 Reviewed-by: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 4d62935 commit bd2b050

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pkg/analyzer/lib/src/test_utilities/find_element.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ class FindElement {
171171
findIn(enum_.accessors);
172172
}
173173

174+
for (var extension_ in unitElement.extensions) {
175+
if (of != null && extension_.name != of) {
176+
continue;
177+
}
178+
findIn(extension_.accessors);
179+
}
180+
174181
for (var class_ in unitElement.types) {
175182
if (of != null && class_.name != of) {
176183
continue;
@@ -275,6 +282,13 @@ class FindElement {
275282
}
276283
}
277284

285+
for (var extension_ in unitElement.extensions) {
286+
if (of != null && extension_.name != of) {
287+
continue;
288+
}
289+
findIn(extension_.methods);
290+
}
291+
278292
for (var class_ in unitElement.types) {
279293
if (of != null && class_.name != of) {
280294
continue;
@@ -372,6 +386,13 @@ class FindElement {
372386
}
373387
}
374388

389+
for (var extension_ in unitElement.extensions) {
390+
if (of != null && extension_.name != of) {
391+
continue;
392+
}
393+
findIn(extension_.accessors);
394+
}
395+
375396
for (var class_ in unitElement.types) {
376397
if (of != null && class_.name != of) {
377398
continue;

0 commit comments

Comments
 (0)