| 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; | |
| 6 | |
| 7 abstract class TreeElements { | 5 abstract class TreeElements { |
| 8 Element operator[](Node node); | 6 Element operator[](Node node); |
| 9 Selector getSelector(Send send); | 7 Selector getSelector(Send send); |
| 10 DartType getType(Node node); | 8 DartType getType(Node node); |
| 11 bool isParameterChecked(Element element); | 9 bool isParameterChecked(Element element); |
| 12 } | 10 } |
| 13 | 11 |
| 14 class TreeElementMapping implements TreeElements { | 12 class TreeElementMapping implements TreeElements { |
| 15 final Element currentElement; | 13 final Element currentElement; |
| 16 final Map<Node, Element> map; | 14 final Map<Node, Element> map; |
| (...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2961 error(node, MessageKind.CANNOT_INSTANTIATE_TYPEDEF, [name]); | 2959 error(node, MessageKind.CANNOT_INSTANTIATE_TYPEDEF, [name]); |
| 2962 } else if (identical(e.kind, ElementKind.TYPE_VARIABLE)) { | 2960 } else if (identical(e.kind, ElementKind.TYPE_VARIABLE)) { |
| 2963 error(node, MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE, [name]); | 2961 error(node, MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE, [name]); |
| 2964 } else if (!identical(e.kind, ElementKind.CLASS) | 2962 } else if (!identical(e.kind, ElementKind.CLASS) |
| 2965 && !identical(e.kind, ElementKind.PREFIX)) { | 2963 && !identical(e.kind, ElementKind.PREFIX)) { |
| 2966 error(node, MessageKind.NOT_A_TYPE, [name]); | 2964 error(node, MessageKind.NOT_A_TYPE, [name]); |
| 2967 } | 2965 } |
| 2968 return e; | 2966 return e; |
| 2969 } | 2967 } |
| 2970 } | 2968 } |
| OLD | NEW |