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

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

Issue 10886016: Get rid of warning. (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 | no next file » | 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 a0b326dfaf8ae5e5395b6d69e99618057c0fc040..8f9c29b76e2266345c4650058b8e84dee00e932d 100644
--- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -359,10 +359,14 @@ class PlaceholderCollector extends AbstractVisitor {
final send = node.typeName.asSend();
Identifier receiver = send.receiver;
Identifier selector = send.selector;
- final hasPrefix = element is TypedefElement ||
- element.lookupConstructor(receiver.source, selector.source)
- === null;
- if (!hasPrefix) target = send.receiver;
+ hasPrefix() {
+ if (element is TypedefElement) return true;
+ ClassElement classElement = element;
+ final constructor = classElement.lookupConstructor(
+ receiver.source, selector.source);
+ return constructor === null;
+ }
+ if (!hasPrefix()) target = send.receiver;
}
}
// TODO(antonm): is there a better way to detect unresolved types?
« 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