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

Side by Side Diff: frog/leg/warnings.dart

Issue 9211005: Support static/global field initializations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files. Created 8 years, 11 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 | « frog/leg/resolver.dart ('k') | frog/tests/leg_only/leg_only.status » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class MessageKind { 5 class MessageKind {
6 final String template; 6 final String template;
7 const MessageKind(this.template); 7 const MessageKind(this.template);
8 8
9 static final GENERIC = const MessageKind('#{1}'); 9 static final GENERIC = const MessageKind('#{1}');
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 'field #{1} is initialized more than once'); 58 'field #{1} is initialized more than once');
59 static final ALREADY_INITIALIZED = const MessageKind( 59 static final ALREADY_INITIALIZED = const MessageKind(
60 '#{1} was already initialized here'); 60 '#{1} was already initialized here');
61 static final INIT_STATIC_FIELD = const MessageKind( 61 static final INIT_STATIC_FIELD = const MessageKind(
62 'cannot initialize static field #{1}'); 62 'cannot initialize static field #{1}');
63 static final NOT_A_FIELD = const MessageKind( 63 static final NOT_A_FIELD = const MessageKind(
64 '#{1} is not a field'); 64 '#{1} is not a field');
65 static final INVALID_FOR_IN = const MessageKind( 65 static final INVALID_FOR_IN = const MessageKind(
66 'Invalid for-in variable declaration.'); 66 'Invalid for-in variable declaration.');
67 67
68 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
69 '#{1} cannot be used as compile-time constant.');
70
68 toString() => template; 71 toString() => template;
69 } 72 }
70 73
71 class Message { 74 class Message {
72 final kind; 75 final kind;
73 final List arguments; 76 final List arguments;
74 String message; 77 String message;
75 78
76 Message(this.kind, this.arguments); 79 Message(this.kind, this.arguments);
77 80
(...skipping 30 matching lines...) Expand all
108 String toString() => message.toString(); 111 String toString() => message.toString();
109 } 112 }
110 113
111 class ResolutionWarning { 114 class ResolutionWarning {
112 final Message message; 115 final Message message;
113 ResolutionWarning.message(this.message); 116 ResolutionWarning.message(this.message);
114 ResolutionWarning(MessageKind kind, List<Type> arguments) 117 ResolutionWarning(MessageKind kind, List<Type> arguments)
115 : message = new Message(kind, arguments); 118 : message = new Message(kind, arguments);
116 String toString() => message.toString(); 119 String toString() => message.toString();
117 } 120 }
121
122 class CompileTimeConstantError {
123 final Message message;
124 CompileTimeConstantError.message(this.message);
125 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
126 : message = new Message(kind, arguments);
127 String toString() => message.toString();
128 }
OLDNEW
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698