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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 15712007: Fix bug in ClassElement.lookupSelector: by returning an abstract method, we were not returning the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/elements/modelx.dart (revision 23237)
+++ sdk/lib/_internal/compiler/implementation/elements/modelx.dart (working copy)
@@ -1582,15 +1582,17 @@
* When called on the implementation element both members declared in the
* origin and the patch class are returned.
*/
- Element lookupSelector(Selector selector) {
- return internalLookupSelector(selector, false);
+ Element lookupSelector(Selector selector, Compiler compiler) {
+ return internalLookupSelector(selector, compiler, false);
}
- Element lookupSuperSelector(Selector selector) {
- return internalLookupSelector(selector, true);
+ Element lookupSuperSelector(Selector selector, Compiler compiler) {
+ return internalLookupSelector(selector, compiler, true);
}
- Element internalLookupSelector(Selector selector, bool isSuperLookup) {
+ Element internalLookupSelector(Selector selector,
+ Compiler compiler,
+ bool isSuperLookup) {
SourceString name = selector.name;
bool isPrivate = name.isPrivate();
LibraryElement library = selector.library;
@@ -1616,12 +1618,14 @@
FunctionElement getter = field.getter;
FunctionElement setter = field.setter;
if (selector.isSetter()) {
- if (setter != null) return setter;
+ // Abstract members can be defined in a super class.
+ if (setter != null && !setter.isAbstract(compiler)) return setter;
} else {
assert(selector.isGetter() || selector.isCall());
- if (getter != null) return getter;
+ if (getter != null && !getter.isAbstract(compiler)) return getter;
}
- } else {
+ // Abstract members can be defined in a super class.
+ } else if (!member.isAbstract(compiler)) {
return member;
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698