| 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 AnalyzableElement get analyzedElement; | 8 AnalyzableElement get analyzedElement; |
| 9 Iterable<Node> get superUses; | 9 Iterable<Node> get superUses; |
| 10 | 10 |
| (...skipping 4250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4261 if (superMember.isErroneous) { | 4261 if (superMember.isErroneous) { |
| 4262 compiler.elementsWithCompileTimeErrors.add(constructor); | 4262 compiler.elementsWithCompileTimeErrors.add(constructor); |
| 4263 } | 4263 } |
| 4264 element.setDefaultConstructor(constructor, compiler); | 4264 element.setDefaultConstructor(constructor, compiler); |
| 4265 } | 4265 } |
| 4266 return element.computeType(compiler); | 4266 return element.computeType(compiler); |
| 4267 } | 4267 } |
| 4268 | 4268 |
| 4269 @override | 4269 @override |
| 4270 DartType visitEnum(Enum node) { | 4270 DartType visitEnum(Enum node) { |
| 4271 if (!compiler.enableEnums) { | |
| 4272 compiler.reportError(node, MessageKind.EXPERIMENTAL_ENUMS); | |
| 4273 } | |
| 4274 | |
| 4275 if (element == null) { | 4271 if (element == null) { |
| 4276 throw compiler.internalError(node, 'element is null'); | 4272 throw compiler.internalError(node, 'element is null'); |
| 4277 } | 4273 } |
| 4278 if (element.resolutionState != STATE_STARTED) { | 4274 if (element.resolutionState != STATE_STARTED) { |
| 4279 throw compiler.internalError(element, | 4275 throw compiler.internalError(element, |
| 4280 'cyclic resolution of class $element'); | 4276 'cyclic resolution of class $element'); |
| 4281 } | 4277 } |
| 4282 | 4278 |
| 4283 InterfaceType enumType = element.computeType(compiler); | 4279 InterfaceType enumType = element.computeType(compiler); |
| 4284 element.supertype = compiler.objectClass.computeType(compiler); | 4280 element.supertype = compiler.objectClass.computeType(compiler); |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5033 } | 5029 } |
| 5034 | 5030 |
| 5035 /// The result for the resolution of the `assert` method. | 5031 /// The result for the resolution of the `assert` method. |
| 5036 class AssertResult implements ResolutionResult { | 5032 class AssertResult implements ResolutionResult { |
| 5037 const AssertResult(); | 5033 const AssertResult(); |
| 5038 | 5034 |
| 5039 Element get element => null; | 5035 Element get element => null; |
| 5040 | 5036 |
| 5041 String toString() => 'AssertResult()'; | 5037 String toString() => 'AssertResult()'; |
| 5042 } | 5038 } |
| OLD | NEW |