Index: pkg/analysis_server/test/search/element_references_test.dart |
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart |
index 809a962237e4db5c792a56b8c6939b77a182dac7..cdd7e13dfee655fe151d69154e638f531e8d88dd 100644 |
--- a/pkg/analysis_server/test/search/element_references_test.dart |
+++ b/pkg/analysis_server/test/search/element_references_test.dart |
@@ -268,13 +268,13 @@ main() { |
test_hierarchy_method() async { |
addTestFile(''' |
class A { |
- mmm() {} // in A |
+ mmm(_) {} // in A |
} |
class B extends A { |
- mmm() {} // in B |
+ mmm(_) {} // in B |
} |
class C extends B { |
- mmm() {} // in C |
+ mmm(_) {} // in C |
} |
main(A a, B b, C c) { |
a.mmm(10); |
@@ -282,13 +282,36 @@ main(A a, B b, C c) { |
c.mmm(30); |
} |
'''); |
- await findElementReferences('mmm() {} // in B', false); |
+ await findElementReferences('mmm(_) {} // in B', false); |
expect(searchElement.kind, ElementKind.METHOD); |
assertHasResult(SearchResultKind.INVOCATION, 'mmm(10)'); |
assertHasResult(SearchResultKind.INVOCATION, 'mmm(20)'); |
assertHasResult(SearchResultKind.INVOCATION, 'mmm(30)'); |
} |
+ test_hierarchy_method_static() async { |
+ addTestFile(''' |
+class A { |
+ static void mmm(_) {} // in A |
+} |
+class B extends A { |
+ static void mmm(_) {} // in B |
+} |
+class C extends B { |
+ static void mmm(_) {} // in C |
+} |
+main() { |
+ A.mmm(10); |
+ B.mmm(20); |
+ C.mmm(30); |
+} |
+'''); |
+ await findElementReferences('mmm(_) {} // in B', false); |
+ expect(searchElement.kind, ElementKind.METHOD); |
+ expect(results, hasLength(1)); |
+ assertHasResult(SearchResultKind.INVOCATION, 'mmm(20)'); |
+ } |
+ |
test_label() async { |
addTestFile(''' |
main() { |