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

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

Issue 9347045: Start supporting default classes. (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
« no previous file with comments | « dart/frog/leg/scanner/class_element_parser.dart ('k') | dart/tests/co19/co19-leg.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 'unused label #{1}'); 104 'unused label #{1}');
105 static final INVALID_CONTINUE = const MessageKind( 105 static final INVALID_CONTINUE = const MessageKind(
106 'target of continue is not a loop or switch case'); 106 'target of continue is not a loop or switch case');
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(
115 "cannot instantiate interface '#{1}'");
116
114 toString() => template; 117 toString() => template;
115 } 118 }
116 119
117 class Message { 120 class Message {
118 final kind; 121 final kind;
119 final List arguments; 122 final List arguments;
120 String message; 123 String message;
121 124
122 Message(this.kind, this.arguments); 125 Message(this.kind, this.arguments);
123 126
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 String toString() => message.toString(); 165 String toString() => message.toString();
163 } 166 }
164 167
165 class CompileTimeConstantError { 168 class CompileTimeConstantError {
166 final Message message; 169 final Message message;
167 CompileTimeConstantError.message(this.message); 170 CompileTimeConstantError.message(this.message);
168 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 171 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
169 : message = new Message(kind, arguments); 172 : message = new Message(kind, arguments);
170 String toString() => message.toString(); 173 String toString() => message.toString();
171 } 174 }
OLDNEW
« no previous file with comments | « dart/frog/leg/scanner/class_element_parser.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698