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

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

Issue 12038087: Add (failing) test case for mixin type parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. 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 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 operator[](Node node); 8 Element operator[](Node node);
9 Selector getSelector(Send send); 9 Selector getSelector(Send send);
10 DartType getType(Node node); 10 DartType getType(Node node);
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 element.defaultClass = visit(node.defaultClause); 2866 element.defaultClass = visit(node.defaultClause);
2867 } 2867 }
2868 element.addDefaultConstructorIfNeeded(compiler); 2868 element.addDefaultConstructorIfNeeded(compiler);
2869 return element.computeType(compiler); 2869 return element.computeType(compiler);
2870 } 2870 }
2871 2871
2872 DartType visitMixinApplication(MixinApplication node) { 2872 DartType visitMixinApplication(MixinApplication node) {
2873 compiler.ensure(element != null); 2873 compiler.ensure(element != null);
2874 compiler.ensure(element.resolutionState == STATE_STARTED); 2874 compiler.ensure(element.resolutionState == STATE_STARTED);
2875 2875
2876 InterfaceType type = element.computeType(compiler);
2877 scope = new TypeDeclarationScope(scope, element);
2878 resolveTypeVariableBounds(node.typeParameters);
2879
2876 // Generate anonymous mixin application elements for the 2880 // Generate anonymous mixin application elements for the
2877 // intermediate mixin applications (excluding the last). 2881 // intermediate mixin applications (excluding the last).
2878 DartType supertype = resolveSupertype(element, node.superclass); 2882 DartType supertype = resolveSupertype(element, node.superclass);
2879 Link<Node> link = node.mixins.nodes; 2883 Link<Node> link = node.mixins.nodes;
2880 while (!link.tail.isEmpty) { 2884 while (!link.tail.isEmpty) {
2881 supertype = applyMixin(supertype, visit(link.head)); 2885 supertype = applyMixin(supertype, visit(link.head));
2882 link = link.tail; 2886 link = link.tail;
2883 } 2887 }
2884 doApplyMixinTo(element, supertype, visit(link.head)); 2888 doApplyMixinTo(element, supertype, visit(link.head));
2885 return element.computeType(compiler); 2889 return element.computeType(compiler);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
3599 return e; 3603 return e;
3600 } 3604 }
3601 3605
3602 /// Assumed to be called by [resolveRedirectingFactory]. 3606 /// Assumed to be called by [resolveRedirectingFactory].
3603 Element visitReturn(Return node) { 3607 Element visitReturn(Return node) {
3604 Node expression = node.expression; 3608 Node expression = node.expression;
3605 return finishConstructorReference(visit(expression), 3609 return finishConstructorReference(visit(expression),
3606 expression, expression); 3610 expression, expression);
3607 } 3611 }
3608 } 3612 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | tests/language/mixin_type_parameters_super_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698