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

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

Issue 9427012: Allow binary operators on compile-time-constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 static final EXISTING_LABEL = const MessageKind( 101 static final EXISTING_LABEL = const MessageKind(
102 'original declaration of duplicate label #{1}'); 102 'original declaration of duplicate label #{1}');
103 static final DUPLICATE_LABEL = const MessageKind( 103 static final DUPLICATE_LABEL = const MessageKind(
104 'duplicate declaration of label #{1}'); 104 'duplicate declaration of label #{1}');
105 static final UNUSED_LABEL = const MessageKind( 105 static final UNUSED_LABEL = const MessageKind(
106 'unused label #{1}'); 106 'unused label #{1}');
107 static final INVALID_CONTINUE = const MessageKind( 107 static final INVALID_CONTINUE = const MessageKind(
108 'target of continue is not a loop or switch case'); 108 'target of continue is not a loop or switch case');
109 109
110 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( 110 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
111 '#{1} cannot be used as compile-time constant'); 111 'not a compile-time constant');
112 112
113 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( 113 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind(
114 '#{1} has no member named #{2}'); 114 '#{1} has no member named #{2}');
115 115
116 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( 116 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind(
117 "cannot instantiate interface '#{1}'"); 117 "cannot instantiate interface '#{1}'");
118 118
119 static final NO_DEFAULT_CLASS = const MessageKind( 119 static final NO_DEFAULT_CLASS = const MessageKind(
120 "no default class on enclosing interface '#{1}'"); 120 "no default class on enclosing interface '#{1}'");
121 121
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 String toString() => message.toString(); 170 String toString() => message.toString();
171 } 171 }
172 172
173 class CompileTimeConstantError { 173 class CompileTimeConstantError {
174 final Message message; 174 final Message message;
175 CompileTimeConstantError.message(this.message); 175 CompileTimeConstantError.message(this.message);
176 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 176 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
177 : message = new Message(kind, arguments); 177 : message = new Message(kind, arguments);
178 String toString() => message.toString(); 178 String toString() => message.toString();
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698