OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.src.error.codes; | 5 library analyzer.src.error.codes; |
6 | 6 |
7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
8 | 8 |
9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; | 9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; |
10 export 'package:analyzer/src/dart/error/hint_codes.dart'; | 10 export 'package:analyzer/src/dart/error/hint_codes.dart'; |
(...skipping 4419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4430 * annotation | 4430 * annotation |
4431 */ | 4431 */ |
4432 static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = | 4432 static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS = |
4433 const StaticWarningCode( | 4433 const StaticWarningCode( |
4434 'TYPE_ANNOTATION_DEFERRED_CLASS', | 4434 'TYPE_ANNOTATION_DEFERRED_CLASS', |
4435 "The deferred type '{0}' can't be used in a declaration, cast or type
test.", | 4435 "The deferred type '{0}' can't be used in a declaration, cast or type
test.", |
4436 "Try using a different type, or " | 4436 "Try using a different type, or " |
4437 "changing the import to not be deferred."); | 4437 "changing the import to not be deferred."); |
4438 | 4438 |
4439 /** | 4439 /** |
| 4440 * Not yet spec'd. |
| 4441 * |
| 4442 * Parameters: |
| 4443 * 0: the name of the generic function's type parameter that is being used in |
| 4444 * an `is` expression |
| 4445 */ |
| 4446 static const StaticWarningCode TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER = |
| 4447 const StaticWarningCode( |
| 4448 'TYPE_ANNOTATION_GENERIC_FUNCTION_PARAMETER', |
| 4449 "The type parameter '{0}' can't be used in a type test.", |
| 4450 "Try using a different type."); |
| 4451 |
| 4452 /** |
4440 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type | 4453 * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type |
4441 * available in the current lexical scope. | 4454 * available in the current lexical scope. |
4442 */ | 4455 */ |
4443 static const StaticWarningCode TYPE_TEST_WITH_NON_TYPE = | 4456 static const StaticWarningCode TYPE_TEST_WITH_NON_TYPE = |
4444 const StaticWarningCode( | 4457 const StaticWarningCode( |
4445 'TYPE_TEST_WITH_NON_TYPE', | 4458 'TYPE_TEST_WITH_NON_TYPE', |
4446 "The name '{0}' isn't a type and can't be used in an 'is' expression."
, | 4459 "The name '{0}' isn't a type and can't be used in an 'is' expression."
, |
4447 "Try correcting the name to match an existing type."); | 4460 "Try correcting the name to match an existing type."); |
4448 | 4461 |
4449 /** | 4462 /** |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4903 * created from the optional [correction] template. | 4916 * created from the optional [correction] template. |
4904 */ | 4917 */ |
4905 const StrongModeCode(ErrorType type, String name, String message, | 4918 const StrongModeCode(ErrorType type, String name, String message, |
4906 [String correction]) | 4919 [String correction]) |
4907 : type = type, | 4920 : type = type, |
4908 super('STRONG_MODE_$name', message, correction); | 4921 super('STRONG_MODE_$name', message, correction); |
4909 | 4922 |
4910 @override | 4923 @override |
4911 ErrorSeverity get errorSeverity => type.severity; | 4924 ErrorSeverity get errorSeverity => type.severity; |
4912 } | 4925 } |
OLD | NEW |