Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 871863006: Enable enums by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove the field in Compiler. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698