[dart2js] Handle injected names from late fields
Change-Id: I5ca6535a282ce8fdf4fba6cd1fa5752bce2921c9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136714 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
c09e6c18b7
commit
eb29627e9e
@@ -636,6 +636,8 @@ class Namer extends ModularNamer {
|
||||
String privateName(Name originalName) {
|
||||
String text = originalName.text;
|
||||
|
||||
text = text.replaceAll(_nonIdentifierRE, '_');
|
||||
|
||||
// Public names are easy.
|
||||
if (!originalName.isPrivate) return text;
|
||||
|
||||
@@ -883,7 +885,8 @@ class Namer extends ModularNamer {
|
||||
if (_closedWorld.isUsedAsMixin(enclosingClass) ||
|
||||
_isShadowingSuperField(element) ||
|
||||
_isUserClassExtendingNative(enclosingClass)) {
|
||||
String proposeName() => '${enclosingClass.name}_${element.name}';
|
||||
String proposeName() => '${enclosingClass.name}_${element.name}'
|
||||
.replaceAll(_nonIdentifierRE, '_');
|
||||
return _disambiguateInternalMember(element, proposeName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user