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

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
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 249
250 static const VOID_NOT_ALLOWED = const MessageKind(
251 'Type void is only allowed in a return type.');
karlklose 2012/09/13 11:43:11 I would prefer to start error messages (that are t
ngeoffray 2012/09/13 11:45:59 Done.
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.
259 262
(...skipping 77 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

Powered by Google App Engine
This is Rietveld 408576698