Skip to content

Commit eb512ee

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Use 'lookupName' in Name.
Change-Id: Ice9138ad9a47f342ac1765f7f7bb348527e5edd4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405447 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
1 parent e075d92 commit eb512ee

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,22 +1391,11 @@ class Name {
13911391
///
13921392
/// If the name is a setter, the name ends with `=`.
13931393
static Name? forElement(Element2 element) {
1394-
var name = element.name3;
1394+
var name = element.lookupName;
13951395
if (name == null) {
13961396
return null;
13971397
}
13981398

1399-
// TODO(scheglov): use lookupName
1400-
if (element is MethodElement2 &&
1401-
name == '-' &&
1402-
element.formalParameters.isEmpty) {
1403-
name = 'unary-';
1404-
}
1405-
1406-
if (element is SetterElement) {
1407-
name = '$name=';
1408-
}
1409-
14101399
if (name.startsWith('_')) {
14111400
var libraryUri = element.firstFragment.libraryFragment!.source.uri;
14121401
return Name(libraryUri, name);

0 commit comments

Comments
 (0)