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

Unified Diff: sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Bug fixes Created 8 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
Index: sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart
diff --git a/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart b/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart
index a3d74bb2bd75a9dabe73f119506eda0fccb7eb9d..3cb1e34e41be0b4fa00fb2d1502af5e41c7282b0 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart
@@ -61,10 +61,17 @@ abstract class PartialTypeTree {
}
// TODO(kasperl): Move this to the Selector class?
+ /**
+ * Returns the [ClassElement] for the most specific supertype of the receiver
ahe 2012/12/03 12:32:01 I don't understand this comment. As far as I can
Johnni Winther 2012/12/04 10:07:17 Done.
+ * type on [selector].
+ */
ClassElement selectorType(Selector selector) {
// TODO(ngeoffray): Should the tree be specialized with DartType?
DartType type = selector.receiverType;
if (type == null) return compiler.objectClass;
ahe 2012/12/03 12:32:01 What if type is dynamic?
Johnni Winther 2012/12/04 10:07:17 Added a TODO.
+ if (identical(type.kind, TypeKind.MALFORMED_TYPE))
+ return compiler.objectClass;
+ // TODO(johnniwinther): Change to use [DartType.unalias].
if (type.element.isTypedef()) return compiler.functionClass;
return type.element;
}

Powered by Google App Engine
This is Rietveld 408576698