Index: pkg/analyzer/lib/src/dart/analysis/search.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart |
index f39948c4e0f77723607b417c136de495fab5e597..e975148af3652d4b079e81a0580534282f8f71ad 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart |
@@ -84,6 +84,9 @@ class Search { |
// TODO(scheglov) optimize for private elements |
String name = element.displayName; |
+ if (element is ConstructorElement) { |
+ name = element.enclosingElement.displayName; |
+ } |
// Prepare the list of files that reference the element name. |
List<String> files = await _driver.getFilesReferencingName(name); |