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

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

Issue 11361093: Address Peter's comments in https://codereview.chromium.org/11361059, and fix a host-checked mode b… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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/universe.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/universe/universe.dart (revision 14518)
+++ sdk/lib/_internal/compiler/implementation/universe/universe.dart (working copy)
@@ -422,7 +422,12 @@
return appliesUntyped(element, compiler);
}
- ClassElement self = receiverType.element;
+ Element self = receiverType.element;
+ if (self.isTypedef()) {
+ // A typedef is a function type that doesn't have any
+ // user-defined members.
+ return false;
+ }
if (other.implementsInterface(self)
|| other.isSubclassOf(self)
@@ -430,7 +435,9 @@
return appliesUntyped(element, compiler);
}
- if (!self.isTypedef() && !self.isInterface() && self.isSubclassOf(other)) {
+ // If [self] is a subclass of [other], it inherits the
+ // implementation of [element].
+ if (self.isSubclassOf(other)) {
// Resolve an invocation of [element.name] on [self]. If it
// is found, this selector is a candidate.
return hasElementIn(self, element) && appliesUntyped(element, compiler);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart ('k') | tests/language/checked_null_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698