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

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

Issue 14636002: Make TypeMask an interface and start hiding implementation details of FlatTypeMask. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
Index: sdk/lib/_internal/compiler/implementation/world.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/world.dart (revision 22167)
+++ sdk/lib/_internal/compiler/implementation/world.dart (working copy)
@@ -152,11 +152,10 @@
if (targets.length != 1) return null;
Element result = targets.first;
ClassElement enclosing = result.getEnclosingClass();
- // TODO(kasperl): Move this code to the type mask.
ti.TypeMask mask = selector.mask;
- ClassElement receiverTypeElement = (mask == null || mask.base == null)
+ ClassElement receiverTypeElement = (mask == null || mask.isEmpty)
? compiler.objectClass
- : mask.base.element;
+ : mask.topClass();
// We only return the found element if it is guaranteed to be
// implemented on the exact receiver type. It could be found in a
// subclass or in an inheritance-wise unrelated class in case of

Powered by Google App Engine
This is Rietveld 408576698