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

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

Issue 9419009: Use shared implementation of Stopwatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( 108 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
109 '#{1} cannot be used as compile-time constant'); 109 '#{1} cannot be used as compile-time constant');
110 110
111 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( 111 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind(
112 '#{1} has no member named #{2}'); 112 '#{1} has no member named #{2}');
113 113
114 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( 114 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind(
115 "cannot instantiate interface '#{1}'"); 115 "cannot instantiate interface '#{1}'");
116 116
117 static final NO_DEFAULT_CLASS = const MessageKind(
118 "no default class on enclosing interface '#{1}'");
119
117 toString() => template; 120 toString() => template;
118 } 121 }
119 122
120 class Message { 123 class Message {
121 final kind; 124 final kind;
122 final List arguments; 125 final List arguments;
123 String message; 126 String message;
124 127
125 Message(this.kind, this.arguments); 128 Message(this.kind, this.arguments);
126 129
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 String toString() => message.toString(); 168 String toString() => message.toString();
166 } 169 }
167 170
168 class CompileTimeConstantError { 171 class CompileTimeConstantError {
169 final Message message; 172 final Message message;
170 CompileTimeConstantError.message(this.message); 173 CompileTimeConstantError.message(this.message);
171 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 174 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
172 : message = new Message(kind, arguments); 175 : message = new Message(kind, arguments);
173 String toString() => message.toString(); 176 String toString() => message.toString();
174 } 177 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698