Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 1433543004: Resolve some static warnings. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 78966e3d53a6377f8f0ba3dbbae4f16b52a515d3..768a0726f57d7103af5c9b87bd80c87e884f9c3d 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698