| OLD | NEW |
| 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 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2222 compiler.backend.registerThrowNoSuchMethod(); | 2222 compiler.backend.registerThrowNoSuchMethod(); |
| 2223 } | 2223 } |
| 2224 if (isComplex && getter == null && !inInstanceContext) { | 2224 if (isComplex && getter == null && !inInstanceContext) { |
| 2225 getter = | 2225 getter = |
| 2226 warnAndCreateErroneousElement(node.selector, field.name, | 2226 warnAndCreateErroneousElement(node.selector, field.name, |
| 2227 MessageKind.CANNOT_RESOLVE_GETTER); | 2227 MessageKind.CANNOT_RESOLVE_GETTER); |
| 2228 compiler.backend.registerThrowNoSuchMethod(); | 2228 compiler.backend.registerThrowNoSuchMethod(); |
| 2229 } | 2229 } |
| 2230 } else if (target.impliesType()) { | 2230 } else if (target.impliesType()) { |
| 2231 compiler.backend.registerThrowNoSuchMethod(); | 2231 compiler.backend.registerThrowNoSuchMethod(); |
| 2232 } else if (target.modifiers.isFinal() || target.modifiers.isConst()) { |
| 2233 setter = |
| 2234 warnAndCreateErroneousElement(node.selector, target.name, |
| 2235 MessageKind.CANNOT_RESOLVE_SETTER); |
| 2236 compiler.backend.registerThrowNoSuchMethod(); |
| 2232 } | 2237 } |
| 2233 } | 2238 } |
| 2234 | 2239 |
| 2235 visit(node.argumentsNode); | 2240 visit(node.argumentsNode); |
| 2236 | 2241 |
| 2237 // TODO(ngeoffray): Check if the target can be assigned. | 2242 // TODO(ngeoffray): Check if the target can be assigned. |
| 2238 // TODO(ngeoffray): Warn if target is null and the send is | 2243 // TODO(ngeoffray): Warn if target is null and the send is |
| 2239 // unqualified. | 2244 // unqualified. |
| 2240 | 2245 |
| 2241 Selector selector = mapping.getSelector(node); | 2246 Selector selector = mapping.getSelector(node); |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3728 return e; | 3733 return e; |
| 3729 } | 3734 } |
| 3730 | 3735 |
| 3731 /// Assumed to be called by [resolveRedirectingFactory]. | 3736 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3732 Element visitReturn(Return node) { | 3737 Element visitReturn(Return node) { |
| 3733 Node expression = node.expression; | 3738 Node expression = node.expression; |
| 3734 return finishConstructorReference(visit(expression), | 3739 return finishConstructorReference(visit(expression), |
| 3735 expression, expression); | 3740 expression, expression); |
| 3736 } | 3741 } |
| 3737 } | 3742 } |
| OLD | NEW |