Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/resolution/members.dart (revision 19425) |
| +++ sdk/lib/_internal/compiler/implementation/resolution/members.dart (working copy) |
| @@ -2005,7 +2005,8 @@ |
| } |
| // TODO(johnniwinther): Ensure correct behavior if currentClass is a |
| // patch. |
| - target = currentClass.lookupSuperMember(name); |
| + target = currentClass.superclass.lookupSelector( |
|
kasperl
2013/03/05 07:32:36
I think this would be easier to read if you did so
ngeoffray
2013/03/05 08:46:25
Done.
|
| + selector, superLookup: true); |
| // [target] may be null which means invoking noSuchMethod on |
| // super. |
| if (target == null) { |
| @@ -2292,14 +2293,6 @@ |
| setter = warnAndCreateErroneousElement( |
| node.selector, target.name, MessageKind.CANNOT_RESOLVE_SETTER); |
| compiler.backend.registerThrowNoSuchMethod(); |
| - } else if (isComplex && target.name == const SourceString('[]=')) { |
| - getter = target.getEnclosingClass().lookupMember( |
| - const SourceString('[]')); |
| - if (getter == null) { |
| - getter = warnAndCreateErroneousElement( |
| - node, setter.name, MessageKind.CANNOT_RESOLVE_INDEX); |
| - compiler.backend.registerThrowNoSuchMethod(); |
| - } |
| } |
| } |
| @@ -2320,6 +2313,16 @@ |
| } |
| registerSend(getterSelector, getter); |
| mapping.setGetterSelectorInComplexSendSet(node, getterSelector); |
| + if (node.isSuperCall) { |
| + getter = currentClass.superclass.lookupSelector( |
| + getterSelector, superLookup: true); |
| + if (getter == null) { |
| + target = warnAndCreateErroneousElement( |
| + node, selector.name, MessageKind.NO_SUCH_SUPER_MEMBER, |
| + {'className': currentClass, 'memberName': selector.name}); |
| + compiler.backend.registerSuperNoSuchMethod(); |
| + } |
| + } |
| useElement(node.selector, getter); |
| // Make sure we include the + and - operators if we are using |