| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../../compiler.dart' as api; | 8 import '../../compiler.dart' as api; |
| 9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 VariableElement fieldElement; | 1143 VariableElement fieldElement; |
| 1144 | 1144 |
| 1145 FieldParameterElementX(String name, | 1145 FieldParameterElementX(String name, |
| 1146 this.fieldElement, | 1146 this.fieldElement, |
| 1147 VariableListElement variables, | 1147 VariableListElement variables, |
| 1148 Node node) | 1148 Node node) |
| 1149 : super(name, variables, ElementKind.FIELD_PARAMETER, node); | 1149 : super(name, variables, ElementKind.FIELD_PARAMETER, node); |
| 1150 | 1150 |
| 1151 DartType computeType(Compiler compiler) { | 1151 DartType computeType(Compiler compiler) { |
| 1152 VariableDefinitions definitions = variables.parseNode(compiler); | 1152 VariableDefinitions definitions = variables.parseNode(compiler); |
| 1153 if (definitions.type == null && !definitions.modifiers.isVar()) { | 1153 if (definitions.type == null) { |
| 1154 return fieldElement.computeType(compiler); | 1154 return fieldElement.computeType(compiler); |
| 1155 } | 1155 } |
| 1156 return super.computeType(compiler); | 1156 return super.computeType(compiler); |
| 1157 } | 1157 } |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 // This element represents a list of variable or field declaration. | 1160 // This element represents a list of variable or field declaration. |
| 1161 // It contains the node, and the type. A [VariableElement] always | 1161 // It contains the node, and the type. A [VariableElement] always |
| 1162 // references its [VariableListElement]. It forwards its | 1162 // references its [VariableListElement]. It forwards its |
| 1163 // [computeType] and [parseNode] methods to this element. | 1163 // [computeType] and [parseNode] methods to this element. |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2370 | 2370 |
| 2371 MetadataAnnotation ensureResolved(Compiler compiler) { | 2371 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2372 if (resolutionState == STATE_NOT_STARTED) { | 2372 if (resolutionState == STATE_NOT_STARTED) { |
| 2373 compiler.resolver.resolveMetadataAnnotation(this); | 2373 compiler.resolver.resolveMetadataAnnotation(this); |
| 2374 } | 2374 } |
| 2375 return this; | 2375 return this; |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2378 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2379 } | 2379 } |
| OLD | NEW |