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