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

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: Created 7 years, 11 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 "count on origin method '#{1}' (#{2})."); 350 "count on origin method '#{1}' (#{2}).");
351 351
352 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind( 352 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind(
353 "Optional parameters of origin and patch method '#{1}' must " 353 "Optional parameters of origin and patch method '#{1}' must "
354 "both be either named or positional."); 354 "both be either named or positional.");
355 355
356 static const PATCH_PARAMETER_MISMATCH = const MessageKind( 356 static const PATCH_PARAMETER_MISMATCH = const MessageKind(
357 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method " 357 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method "
358 "#{1}."); 358 "#{1}.");
359 359
360 static const PATCH_POINT_TO_FUNCTION = const MessageKind(
361 "Info: This is the function patch '#{1}'.");
362
363 static const PATCH_POINT_TO_CLASS = const MessageKind(
364 "Info: This is the class patch '#{1}'.");
365
366 static const PATCH_POINT_TO_GETTER = const MessageKind(
367 "Info: This is the getter patch '#{1}'.");
368
369 static const PATCH_POINT_TO_SETTER = const MessageKind(
370 "Info: This is the setter patch '#{1}'.");
371
372 static const PATCH_POINT_TO_CONSTRUCTOR = const MessageKind(
373 "Info: This is the constructor patch '#{1}'.");
374
375 static const PATCH_NON_EXISTING = const MessageKind(
376 "Error: Origin does not exist for patch '#{1}'.");
377
378 static const PATCH_NONPATCHABLE = const MessageKind(
379 "Error: Only classes and functions can be patched.");
380
381 static const PATCH_NON_EXTERNAL = const MessageKind(
382 "Error: Only external functions can be patched.");
383
384 static const PATCH_NON_CLASS = const MessageKind(
385 "Error: Patching non-class with class patch '#{1}'.");
386
387 static const PATCH_NON_GETTER = const MessageKind(
388 "Error: Cannot patch non-getter '#{1}' with getter patch.");
389
390 static const PATCH_NO_GETTER = const MessageKind(
391 "Error: No getter found for getter patch '#{1}'.");
392
393 static const PATCH_NON_SETTER = const MessageKind(
394 "Error: Cannot patch non-setter with setter patch '#{1}'.");
395
396 static const PATCH_NO_SETTER = const MessageKind(
397 "Error: No setter found for getter patch '#{1}'.");
398
399 static const PATCH_NON_CONSTRUCTOR = const MessageKind(
400 "Error: Cannot patch non-constructor with constructor patch '#{1}'.");
401
402 static const PATCH_NON_FUNCTION = const MessageKind(
403 "Error: Cannot patch non-function with function patch '#{1}'.");
404
360 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind( 405 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind(
361 "Top-level variable cannot be declared static."); 406 "Top-level variable cannot be declared static.");
362 407
363 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind( 408 static const WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT = const MessageKind(
364 "Wrong number of arguments to assert. Should be 1, but given #{1}."); 409 "Wrong number of arguments to assert. Should be 1, but given #{1}.");
365 410
366 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind( 411 static const ASSERT_IS_GIVEN_NAMED_ARGUMENTS = const MessageKind(
367 "assert takes no named arguments, but given #{1}."); 412 "assert takes no named arguments, but given #{1}.");
368 413
369 static const MALFORMED_TYPE_REFERENCE = const MessageKind( 414 static const MALFORMED_TYPE_REFERENCE = const MessageKind(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 511
467 class CompileTimeConstantError extends Diagnostic { 512 class CompileTimeConstantError extends Diagnostic {
468 CompileTimeConstantError(MessageKind kind, List arguments) 513 CompileTimeConstantError(MessageKind kind, List arguments)
469 : super(kind, arguments); 514 : super(kind, arguments);
470 } 515 }
471 516
472 class CompilationError extends Diagnostic { 517 class CompilationError extends Diagnostic {
473 CompilationError(MessageKind kind, List arguments) 518 CompilationError(MessageKind kind, List arguments)
474 : super(kind, arguments); 519 : super(kind, arguments);
475 } 520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698