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

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

Issue 11348376: Report errors when factory redirection is used in non-factory methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years 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 part of dart2js; 5 part of dart2js;
6 6
7 class MessageKind { 7 class MessageKind {
8 final String template; 8 final String template;
9 const MessageKind(this.template); 9 const MessageKind(this.template);
10 10
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind( 329 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind(
330 "Wrong number of arguments to assert. Should be 1, but given #{1}."); 330 "Wrong number of arguments to assert. Should be 1, but given #{1}.");
331 331
332 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( 332 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind(
333 "assert takes no named arguments, but given #{1}."); 333 "assert takes no named arguments, but given #{1}.");
334 334
335 static const MALFORMED_TYPE_REFERENCE = const MessageKind( 335 static const MALFORMED_TYPE_REFERENCE = const MessageKind(
336 "Malformed type reference encountered in #{1}."); 336 "Malformed type reference encountered in #{1}.");
337 337
338 static const FACTORY_REDIRECTION_IN_NON_FACTORY = const MessageKind(
339 "Error: Factory redirection only allowed in factories.");
340
341 static const MISSING_FACTORY_KEYWORD = const MessageKind(
342 "Did you forget a factory keyword here?");
343
338 static const COMPILER_CRASHED = const MessageKind( 344 static const COMPILER_CRASHED = const MessageKind(
339 "Error: The compiler crashed when compiling this element."); 345 "Error: The compiler crashed when compiling this element.");
340 346
341 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 347 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
342 The compiler is broken. 348 The compiler is broken.
343 349
344 When compiling the above element, the compiler crashed. It is not 350 When compiling the above element, the compiler crashed. It is not
345 possible to tell if this is caused by a problem in your program or 351 possible to tell if this is caused by a problem in your program or
346 not. Regardless, the compiler should not crash. 352 not. Regardless, the compiler should not crash.
347 353
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 432
427 class CompileTimeConstantError extends Diagnostic { 433 class CompileTimeConstantError extends Diagnostic {
428 CompileTimeConstantError(MessageKind kind, List arguments) 434 CompileTimeConstantError(MessageKind kind, List arguments)
429 : super(kind, arguments); 435 : super(kind, arguments);
430 } 436 }
431 437
432 class CompilationError extends Diagnostic { 438 class CompilationError extends Diagnostic {
433 CompilationError(MessageKind kind, List arguments) 439 CompilationError(MessageKind kind, List arguments)
434 : super(kind, arguments); 440 : super(kind, arguments);
435 } 441 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | dart/tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698