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

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

Issue 12223004: Allow private selectors to be typed, and fix ClassElement.isSubclassOf to take patches into account. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/compiler/dart2js/patch_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/universe/universe.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/universe/universe.dart (revision 18125)
+++ sdk/lib/_internal/compiler/implementation/universe/universe.dart (working copy)
@@ -453,12 +453,14 @@
* invoked on an instance of [cls].
*/
bool hasElementIn(ClassElement cls, Element element) {
- Element resolved = cls.lookupMember(element.name);
- if (identical(resolved, element)) return true;
+ // Use the selector for the lookup instead of [:element.name:]
+ // because the selector has the right privacy information.
+ Element resolved = cls.lookupSelector(this);
+ if (resolved == element) return true;
if (resolved == null) return false;
- if (identical(resolved.kind, ElementKind.ABSTRACT_FIELD)) {
+ if (resolved.isAbstractField()) {
AbstractFieldElement field = resolved;
- if (identical(element, field.getter) || identical(element, field.setter)) {
+ if (element == field.getter || element == field.setter) {
return true;
} else {
ClassElement otherCls = field.getEnclosingClass();
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/compiler/dart2js/patch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698