mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 13:08:10 +00:00
Resolve some static warnings.
R=karlklose@google.com BUG= Review URL: https://codereview.chromium.org/1433543004 .
This commit is contained in:
parent
6ba13e2570
commit
2cecb9ec9c
|
@ -785,9 +785,10 @@ class Namer {
|
|||
// However, as boxes are not really instances of classes, the usual naming
|
||||
// scheme that tries to avoid name clashes with super classes does not
|
||||
// apply. So we can directly grab a name.
|
||||
if (element is JSEntity) {
|
||||
Entity asEntity = element;
|
||||
if (asEntity is JSEntity) {
|
||||
return _disambiguateInternalMember(element,
|
||||
() => element.declaredEntity.name);
|
||||
() => asEntity.declaredEntity.name);
|
||||
}
|
||||
|
||||
// If the name of the field might clash with another field,
|
||||
|
@ -1012,8 +1013,9 @@ class Namer {
|
|||
if (newName == null) {
|
||||
String name = proposeName();
|
||||
|
||||
if (element is PrivatelyNamedJSEntity) {
|
||||
NamingScope scope = _getPrivateScopeFor(element);
|
||||
Entity asEntity = element;
|
||||
if (asEntity is PrivatelyNamedJSEntity) {
|
||||
NamingScope scope = _getPrivateScopeFor(asEntity);
|
||||
newName = getFreshName(scope, name,
|
||||
sanitizeForAnnotations: true,
|
||||
sanitizeForNatives: false);
|
||||
|
|
Loading…
Reference in a new issue