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

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

Issue 11864010: Improve checking of patches. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 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 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 "Optional parameters of origin and patch method '#{methodName}' must " 378 "Optional parameters of origin and patch method '#{methodName}' must "
379 "both be either named or positional."); 379 "both be either named or positional.");
380 380
381 static const PATCH_PARAMETER_MISMATCH = const MessageKind( 381 static const PATCH_PARAMETER_MISMATCH = const MessageKind(
382 "Patch method parameter '#{patchParameter}' doesn't match " 382 "Patch method parameter '#{patchParameter}' doesn't match "
383 "'#{originParameter}' on origin method #{methodName}."); 383 "'#{originParameter}' on origin method #{methodName}.");
384 384
385 static const EXTERNAL_WITHOUT_IMPLEMENTATION = const MessageKind( 385 static const EXTERNAL_WITHOUT_IMPLEMENTATION = const MessageKind(
386 "External method without an implementation."); 386 "External method without an implementation.");
387 387
388 static const PATCH_POINT_TO_FUNCTION = const MessageKind(
389 "Info: This is the function patch '#{functionName}'.");
390
391 static const PATCH_POINT_TO_CLASS = const MessageKind(
392 "Info: This is the class patch '#{className}'.");
393
394 static const PATCH_POINT_TO_GETTER = const MessageKind(
395 "Info: This is the getter patch '#{getterName}'.");
396
397 static const PATCH_POINT_TO_SETTER = const MessageKind(
398 "Info: This is the setter patch '#{setterName}'.");
399
400 static const PATCH_POINT_TO_CONSTRUCTOR = const MessageKind(
401 "Info: This is the constructor patch '#{constructorName}'.");
402
403 static const PATCH_NON_EXISTING = const MessageKind(
404 "Error: Origin does not exist for patch '#{name}'.");
405
406 static const PATCH_NONPATCHABLE = const MessageKind(
407 "Error: Only classes and functions can be patched.");
408
409 static const PATCH_NON_EXTERNAL = const MessageKind(
410 "Error: Only external functions can be patched.");
411
412 static const PATCH_NON_CLASS = const MessageKind(
413 "Error: Patching non-class with class patch '#{className}'.");
414
415 static const PATCH_NON_GETTER = const MessageKind(
416 "Error: Cannot patch non-getter '#{name}' with getter patch.");
417
418 static const PATCH_NO_GETTER = const MessageKind(
419 "Error: No getter found for getter patch '#{getterName}'.");
420
421 static const PATCH_NON_SETTER = const MessageKind(
422 "Error: Cannot patch non-setter '#{name}' with setter patch.");
423
424 static const PATCH_NO_SETTER = const MessageKind(
425 "Error: No setter found for setter patch '#{setterName}'.");
426
427 static const PATCH_NON_CONSTRUCTOR = const MessageKind(
428 "Error: Cannot patch non-constructor with constructor patch "
429 "'#{constructorName}'.");
430
431 static const PATCH_NON_FUNCTION = const MessageKind(
432 "Error: Cannot patch non-function with function patch "
433 "'#{functionName}'.");
434
388 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind( 435 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind(
389 "Top-level variable cannot be declared static."); 436 "Top-level variable cannot be declared static.");
390 437
391 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind( 438 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind(
392 "Wrong number of arguments to assert. Should be 1, but given " 439 "Wrong number of arguments to assert. Should be 1, but given "
393 "#{argumentCount}."); 440 "#{argumentCount}.");
394 441
395 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( 442 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind(
396 "assert takes no named arguments, but given #{argumentCount}."); 443 "assert takes no named arguments, but given #{argumentCount}.");
397 444
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 548
502 class CompileTimeConstantError extends Diagnostic { 549 class CompileTimeConstantError extends Diagnostic {
503 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 550 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
504 : super(kind, arguments); 551 : super(kind, arguments);
505 } 552 }
506 553
507 class CompilationError extends Diagnostic { 554 class CompilationError extends Diagnostic {
508 CompilationError(MessageKind kind, [Map arguments = const {}]) 555 CompilationError(MessageKind kind, [Map arguments = const {}])
509 : super(kind, arguments); 556 : super(kind, arguments);
510 } 557 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698