| OLD | NEW |
| 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 /** | 5 /** |
| 6 * The messages in this file should meet the following guide lines: | 6 * The messages in this file should meet the following guide lines: |
| 7 * | 7 * |
| 8 * 1. The message should be a complete sentence starting with an uppercase | 8 * 1. The message should be a complete sentence starting with an uppercase |
| 9 * letter, and ending with a period. | 9 * letter, and ending with a period. |
| 10 * | 10 * |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 PATCH_PARAMETER_MISMATCH, | 378 PATCH_PARAMETER_MISMATCH, |
| 379 PATCH_PARAMETER_TYPE_MISMATCH, | 379 PATCH_PARAMETER_TYPE_MISMATCH, |
| 380 PATCH_POINT_TO_CLASS, | 380 PATCH_POINT_TO_CLASS, |
| 381 PATCH_POINT_TO_CONSTRUCTOR, | 381 PATCH_POINT_TO_CONSTRUCTOR, |
| 382 PATCH_POINT_TO_FUNCTION, | 382 PATCH_POINT_TO_FUNCTION, |
| 383 PATCH_POINT_TO_GETTER, | 383 PATCH_POINT_TO_GETTER, |
| 384 PATCH_POINT_TO_PARAMETER, | 384 PATCH_POINT_TO_PARAMETER, |
| 385 PATCH_POINT_TO_SETTER, | 385 PATCH_POINT_TO_SETTER, |
| 386 PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH, | 386 PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH, |
| 387 PATCH_RETURN_TYPE_MISMATCH, | 387 PATCH_RETURN_TYPE_MISMATCH, |
| 388 PATCH_TYPE_VARIABLES_MISMATCH, |
| 388 PLEASE_REPORT_THE_CRASH, | 389 PLEASE_REPORT_THE_CRASH, |
| 389 POSITIONAL_PARAMETER_WITH_EQUALS, | 390 POSITIONAL_PARAMETER_WITH_EQUALS, |
| 390 POTENTIAL_MUTATION, | 391 POTENTIAL_MUTATION, |
| 391 POTENTIAL_MUTATION_HERE, | 392 POTENTIAL_MUTATION_HERE, |
| 392 POTENTIAL_MUTATION_IN_CLOSURE, | 393 POTENTIAL_MUTATION_IN_CLOSURE, |
| 393 POTENTIAL_MUTATION_IN_CLOSURE_HERE, | 394 POTENTIAL_MUTATION_IN_CLOSURE_HERE, |
| 394 PREAMBLE, | 395 PREAMBLE, |
| 395 PREFIX_AS_EXPRESSION, | 396 PREFIX_AS_EXPRESSION, |
| 396 PRIVATE_ACCESS, | 397 PRIVATE_ACCESS, |
| 397 PRIVATE_IDENTIFIER, | 398 PRIVATE_IDENTIFIER, |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 """, | 1233 """, |
| 1233 """ | 1234 """ |
| 1234 // Method type variables are not reified, so they cannot be tested dynamically. | 1235 // Method type variables are not reified, so they cannot be tested dynamically. |
| 1235 bool f<T>(Object o) => o is T; | 1236 bool f<T>(Object o) => o is T; |
| 1236 | 1237 |
| 1237 main() => f<int>(42); | 1238 main() => f<int>(42); |
| 1238 """ | 1239 """ |
| 1239 ]), | 1240 ]), |
| 1240 | 1241 |
| 1241 MessageKind.TYPE_VARIABLE_FROM_METHOD_CONSIDERED_DYNAMIC: | 1242 MessageKind.TYPE_VARIABLE_FROM_METHOD_CONSIDERED_DYNAMIC: |
| 1242 const MessageTemplate( | 1243 const MessageTemplate( |
| 1243 MessageKind.TYPE_VARIABLE_FROM_METHOD_CONSIDERED_DYNAMIC, | 1244 MessageKind.TYPE_VARIABLE_FROM_METHOD_CONSIDERED_DYNAMIC, |
| 1244 "Method type variables are treated as `dynamic` in `as` expressions.", | 1245 "Method type variables are treated as `dynamic` in `as` " |
| 1245 howToFix: "Try using the upper bound of the type variable, or check " | 1246 "expressions.", |
| 1246 "that the blind success of the test does not introduce bugs.", | 1247 howToFix: |
| 1247 examples: const [ | 1248 "Try using the upper bound of the type variable, or check " |
| 1249 "that the blind success of the test does not introduce bugs.", |
| 1250 examples: const [ |
| 1248 """ | 1251 """ |
| 1249 // Method type variables are not reified, so they cannot be tested dynamically. | 1252 // Method type variables are not reified, so they cannot be tested dynamically. |
| 1250 bool f<T>(Object o) => o as T; | 1253 bool f<T>(Object o) => o as T; |
| 1251 | 1254 |
| 1252 main() => f<int>(42); | 1255 main() => f<int>(42); |
| 1253 """ | 1256 """ |
| 1254 ]), | 1257 ]), |
| 1255 | 1258 |
| 1256 MessageKind.INVALID_TYPE_VARIABLE_BOUND: const MessageTemplate( | 1259 MessageKind.INVALID_TYPE_VARIABLE_BOUND: const MessageTemplate( |
| 1257 MessageKind.INVALID_TYPE_VARIABLE_BOUND, | 1260 MessageKind.INVALID_TYPE_VARIABLE_BOUND, |
| (...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3523 'part.dart': """ | 3526 'part.dart': """ |
| 3524 part of test.main; | 3527 part of test.main; |
| 3525 """, | 3528 """, |
| 3526 } | 3529 } |
| 3527 ]), | 3530 ]), |
| 3528 | 3531 |
| 3529 //////////////////////////////////////////////////////////////////////////
//// | 3532 //////////////////////////////////////////////////////////////////////////
//// |
| 3530 // Patch errors start. | 3533 // Patch errors start. |
| 3531 //////////////////////////////////////////////////////////////////////////
//// | 3534 //////////////////////////////////////////////////////////////////////////
//// |
| 3532 | 3535 |
| 3536 MessageKind.PATCH_TYPE_VARIABLES_MISMATCH: const MessageTemplate( |
| 3537 MessageKind.PATCH_TYPE_VARIABLES_MISMATCH, |
| 3538 "Patch type variables do not match " |
| 3539 "type variables on origin method '#{methodName}'."), |
| 3540 |
| 3533 MessageKind.PATCH_RETURN_TYPE_MISMATCH: const MessageTemplate( | 3541 MessageKind.PATCH_RETURN_TYPE_MISMATCH: const MessageTemplate( |
| 3534 MessageKind.PATCH_RETURN_TYPE_MISMATCH, | 3542 MessageKind.PATCH_RETURN_TYPE_MISMATCH, |
| 3535 "Patch return type '#{patchReturnType}' does not match " | 3543 "Patch return type '#{patchReturnType}' does not match " |
| 3536 "'#{originReturnType}' on origin method '#{methodName}'."), | 3544 "'#{originReturnType}' on origin method '#{methodName}'."), |
| 3537 | 3545 |
| 3538 MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH: const MessageTemplate
( | 3546 MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH: const MessageTemplate
( |
| 3539 MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH, | 3547 MessageKind.PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH, |
| 3540 "Required parameter count of patch method " | 3548 "Required parameter count of patch method " |
| 3541 "(#{patchParameterCount}) does not match parameter count on origin " | 3549 "(#{patchParameterCount}) does not match parameter count on origin " |
| 3542 "method '#{methodName}' (#{originParameterCount})."), | 3550 "method '#{methodName}' (#{originParameterCount})."), |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3827 static String convertToString(value) { | 3835 static String convertToString(value) { |
| 3828 if (value is ErrorToken) { | 3836 if (value is ErrorToken) { |
| 3829 // Shouldn't happen. | 3837 // Shouldn't happen. |
| 3830 return value.assertionMessage; | 3838 return value.assertionMessage; |
| 3831 } else if (value is Token) { | 3839 } else if (value is Token) { |
| 3832 value = value.value; | 3840 value = value.value; |
| 3833 } | 3841 } |
| 3834 return '$value'; | 3842 return '$value'; |
| 3835 } | 3843 } |
| 3836 } | 3844 } |
| OLD | NEW |