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

Side by Side Diff: lib/compiler/implementation/warnings.dart

Issue 10908238: Only allow 'void' as a return type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.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 const GENERIC = const MessageKind('#{1}'); 9 static const GENERIC = const MessageKind('#{1}');
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( 235 static const ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind(
236 "Error: cannot have final modifier on method."); 236 "Error: cannot have final modifier on method.");
237 237
238 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( 238 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind(
239 "Error: illegal constructor modifiers: #{1}."); 239 "Error: illegal constructor modifiers: #{1}.");
240 240
241 static const PARAMETER_NAME_EXPECTED = const MessageKind( 241 static const PARAMETER_NAME_EXPECTED = const MessageKind(
242 "Error: parameter name expected."); 242 "Error: parameter name expected.");
243 243
244 static const CANNOT_RESOLVE_GETTER = const MessageKind( 244 static const CANNOT_RESOLVE_GETTER = const MessageKind(
245 'Cannot resolve getter.'); 245 'cannot resolve getter.');
246 246
247 static const CANNOT_RESOLVE_SETTER = const MessageKind( 247 static const CANNOT_RESOLVE_SETTER = const MessageKind(
248 'Cannot resolve setter.'); 248 'cannot resolve setter.');
249
250 static const VOID_NOT_ALLOWED = const MessageKind(
251 'type void is only allowed in a return type.');
249 252
250 static const COMPILER_CRASHED = const MessageKind( 253 static const COMPILER_CRASHED = const MessageKind(
251 "Error: The compiler crashed when compiling this element."); 254 "Error: The compiler crashed when compiling this element.");
252 255
253 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 256 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
254 The compiler is broken. 257 The compiler is broken.
255 258
256 When compiling the above element, the compiler crashed. It is not 259 When compiling the above element, the compiler crashed. It is not
257 possible to tell if this is caused by a problem in your program or 260 possible to tell if this is caused by a problem in your program or
258 not. Regardless, the compiler should not crash. 261 not. Regardless, the compiler should not crash.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 340
338 class CompileTimeConstantError extends Diagnostic { 341 class CompileTimeConstantError extends Diagnostic {
339 CompileTimeConstantError(MessageKind kind, List arguments) 342 CompileTimeConstantError(MessageKind kind, List arguments)
340 : super(kind, arguments); 343 : super(kind, arguments);
341 } 344 }
342 345
343 class CompilationError extends Diagnostic { 346 class CompilationError extends Diagnostic {
344 CompilationError(MessageKind kind, List arguments) 347 CompilationError(MessageKind kind, List arguments)
345 : super(kind, arguments); 348 : super(kind, arguments);
346 } 349 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698