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

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 member.
ahe 2012/11/05 11:23:01 member -> members.
ngeoffray 2012/11/05 11:40:01 Done.
ngeoffray 2012/11/05 11:40:01 Done.
+ return false;
+ }
if (other.implementsInterface(self)
|| other.isSubclassOf(self)
@@ -430,7 +435,7 @@
return appliesUntyped(element, compiler);
}
- if (!self.isTypedef() && !self.isInterface() && self.isSubclassOf(other)) {
+ if (self.isSubclassOf(other)) {
ahe 2012/11/05 11:23:01 Should this be checking subtype relation instead?
ngeoffray 2012/11/05 11:40:01 No, this is checking if [element] (which is define
// Resolve an invocation of [element.name] on [self]. If it
// is found, this selector is a candidate.
return hasElementIn(self, element) && appliesUntyped(element, compiler);

Powered by Google App Engine
This is Rietveld 408576698