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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 15381002: Fix a pretty bad bug of a class inheriting a patched class. The fix is (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 } 2553 }
2554 if (cls.isAbstract(compiler)) { 2554 if (cls.isAbstract(compiler)) {
2555 compiler.backend.registerAbstractClassInstantiation(mapping); 2555 compiler.backend.registerAbstractClassInstantiation(mapping);
2556 } 2556 }
2557 // [cls] might be the declaration element and we want to include injected 2557 // [cls] might be the declaration element and we want to include injected
2558 // members. 2558 // members.
2559 cls.implementation.forEachInstanceField( 2559 cls.implementation.forEachInstanceField(
2560 (ClassElement enclosingClass, Element member) { 2560 (ClassElement enclosingClass, Element member) {
2561 world.addToWorkList(member); 2561 world.addToWorkList(member);
2562 }, 2562 },
2563 includeBackendMembers: false, 2563 includeSuperAndInjectedMembers: true);
2564 includeSuperMembers: true);
2565 2564
2566 if (isSymbolConstructor) { 2565 if (isSymbolConstructor) {
2567 if (node.isConst()) { 2566 if (node.isConst()) {
2568 Node argumentNode = node.send.arguments.head; 2567 Node argumentNode = node.send.arguments.head;
2569 Constant name = compiler.metadataHandler.compileNodeWithDefinitions( 2568 Constant name = compiler.metadataHandler.compileNodeWithDefinitions(
2570 argumentNode, mapping, isConst: true); 2569 argumentNode, mapping, isConst: true);
2571 if (!name.isString()) { 2570 if (!name.isString()) {
2572 DartType type = name.computeType(compiler); 2571 DartType type = name.computeType(compiler);
2573 compiler.reportErrorCode(argumentNode, MessageKind.STRING_EXPECTED, 2572 compiler.reportErrorCode(argumentNode, MessageKind.STRING_EXPECTED,
2574 {'type': type}); 2573 {'type': type});
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
3927 return e; 3926 return e;
3928 } 3927 }
3929 3928
3930 /// Assumed to be called by [resolveRedirectingFactory]. 3929 /// Assumed to be called by [resolveRedirectingFactory].
3931 Element visitReturn(Return node) { 3930 Element visitReturn(Return node) {
3932 Node expression = node.expression; 3931 Node expression = node.expression;
3933 return finishConstructorReference(visit(expression), 3932 return finishConstructorReference(visit(expression),
3934 expression, expression); 3933 expression, expression);
3935 } 3934 }
3936 } 3935 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698