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

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

Issue 13084013: Handle assignability for Send and SendSet (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Debug code removed. 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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 target = 2204 target =
2205 warnAndCreateErroneousElement(node.selector, field.name, 2205 warnAndCreateErroneousElement(node.selector, field.name,
2206 MessageKind.CANNOT_RESOLVE_GETTER); 2206 MessageKind.CANNOT_RESOLVE_GETTER);
2207 } 2207 }
2208 } else if (target.isTypeVariable()) { 2208 } else if (target.isTypeVariable()) {
2209 ClassElement cls = target.getEnclosingClass(); 2209 ClassElement cls = target.getEnclosingClass();
2210 assert(enclosingElement.getEnclosingClass() == cls); 2210 assert(enclosingElement.getEnclosingClass() == cls);
2211 compiler.backend.registerClassUsingVariableExpression(cls); 2211 compiler.backend.registerClassUsingVariableExpression(cls);
2212 compiler.backend.registerTypeVariableExpression(mapping); 2212 compiler.backend.registerTypeVariableExpression(mapping);
2213 } else if (target.impliesType() && !sendIsMemberAccess) { 2213 } else if (target.impliesType() && !sendIsMemberAccess) {
2214 // Set the type of the node to [Type] to mark this send as a
2215 // type literal.
2216 mapping.setType(node, compiler.typeClass.computeType(compiler));
2214 compiler.backend.registerTypeLiteral(mapping); 2217 compiler.backend.registerTypeLiteral(mapping);
2215 } 2218 }
2216 } 2219 }
2217 2220
2218 bool resolvedArguments = false; 2221 bool resolvedArguments = false;
2219 if (node.isOperator) { 2222 if (node.isOperator) {
2220 String operatorString = node.selector.asOperator().source.stringValue; 2223 String operatorString = node.selector.asOperator().source.stringValue;
2221 if (operatorString == 'is' || operatorString == 'as') { 2224 if (operatorString == 'is' || operatorString == 'as') {
2222 assert(node.arguments.tail.isEmpty); 2225 assert(node.arguments.tail.isEmpty);
2223 DartType type = resolveTypeTest(node.arguments.head); 2226 DartType type = resolveTypeTest(node.arguments.head);
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
3946 return e; 3949 return e;
3947 } 3950 }
3948 3951
3949 /// Assumed to be called by [resolveRedirectingFactory]. 3952 /// Assumed to be called by [resolveRedirectingFactory].
3950 Element visitReturn(Return node) { 3953 Element visitReturn(Return node) {
3951 Node expression = node.expression; 3954 Node expression = node.expression;
3952 return finishConstructorReference(visit(expression), 3955 return finishConstructorReference(visit(expression),
3953 expression, expression); 3956 expression, expression);
3954 } 3957 }
3955 } 3958 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698