| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library engine.resolver.element_resolver; | 5 library engine.resolver.element_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart'; | 9 import 'ast.dart'; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (function is ConstructorElement) { | 139 if (function is ConstructorElement) { |
| 140 return function.isConst; | 140 return function.isConst; |
| 141 } | 141 } |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 | 144 |
| 145 @override | 145 @override |
| 146 Object visitAssignmentExpression(AssignmentExpression node) { | 146 Object visitAssignmentExpression(AssignmentExpression node) { |
| 147 sc.Token operator = node.operator; | 147 sc.Token operator = node.operator; |
| 148 sc.TokenType operatorType = operator.type; | 148 sc.TokenType operatorType = operator.type; |
| 149 if (operatorType != sc.TokenType.EQ) { | 149 if (operatorType != sc.TokenType.EQ && |
| 150 operatorType != sc.TokenType.QUESTION_QUESTION_EQ) { |
| 150 operatorType = _operatorFromCompoundAssignment(operatorType); | 151 operatorType = _operatorFromCompoundAssignment(operatorType); |
| 151 Expression leftHandSide = node.leftHandSide; | 152 Expression leftHandSide = node.leftHandSide; |
| 152 if (leftHandSide != null) { | 153 if (leftHandSide != null) { |
| 153 String methodName = operatorType.lexeme; | 154 String methodName = operatorType.lexeme; |
| 154 DartType staticType = _getStaticType(leftHandSide); | 155 DartType staticType = _getStaticType(leftHandSide); |
| 155 MethodElement staticMethod = | 156 MethodElement staticMethod = |
| 156 _lookUpMethod(leftHandSide, staticType, methodName); | 157 _lookUpMethod(leftHandSide, staticType, methodName); |
| 157 node.staticElement = staticMethod; | 158 node.staticElement = staticMethod; |
| 158 DartType propagatedType = _getPropagatedType(leftHandSide); | 159 DartType propagatedType = _getPropagatedType(leftHandSide); |
| 159 MethodElement propagatedMethod = | 160 MethodElement propagatedMethod = |
| (...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 | 2908 |
| 2908 @override | 2909 @override |
| 2909 Element get staticElement => null; | 2910 Element get staticElement => null; |
| 2910 | 2911 |
| 2911 @override | 2912 @override |
| 2912 accept(AstVisitor visitor) => null; | 2913 accept(AstVisitor visitor) => null; |
| 2913 | 2914 |
| 2914 @override | 2915 @override |
| 2915 void visitChildren(AstVisitor visitor) {} | 2916 void visitChildren(AstVisitor visitor) {} |
| 2916 } | 2917 } |
| OLD | NEW |