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

Unified Diff: lib/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 10875006: Remove a few warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months 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 | lib/compiler/implementation/scanner/partial_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/lib/compiler/implementation/dart_backend/placeholder_collector.dart b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
index 14a2674167a5b74b88b90235c2352e09b1cd4951..33511034b100d272430fde652dd76fb114921ac1 100644
--- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -439,13 +439,13 @@ class PlaceholderCollector extends AbstractVisitor {
}
visitClassNode(ClassNode node) {
- assert(currentElement is ClassElement);
- makeElementPlaceholder(node.name, currentElement);
+ ClassElement classElement = currentElement;
+ makeElementPlaceholder(node.name, classElement);
node.visitChildren(this);
if (node.typeParameters !== null) {
// Another poor man resolution.
final typeVariableTypes =
- new List<Type>.from(currentElement.typeVariables);
+ new List<Type>.from(classElement.typeVariables);
int i = 0;
for (TypeVariable typeVariable in node.typeParameters) {
makeTypePlaceholder(typeVariable.name, typeVariableTypes[i]);
@@ -455,7 +455,7 @@ class PlaceholderCollector extends AbstractVisitor {
if (node.defaultClause !== null) {
// Can't just visit class node's default clause because of the bug in the
// resolver, it just crashes when it meets type variable.
- Type defaultType = (currentElement as ClassElement).defaultClass;
+ Type defaultType = classElement.defaultClass;
assert(defaultType !== null);
makeTypePlaceholder(node.defaultClause.typeName, defaultType);
visit(node.defaultClause.typeArguments);
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/partial_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698