| 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 4880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4891 'IMPLICIT_DYNAMIC_METHOD', | 4891 'IMPLICIT_DYNAMIC_METHOD', |
| 4892 "Missing type arguments for generic method '{0}<{1}>'.", | 4892 "Missing type arguments for generic method '{0}<{1}>'.", |
| 4893 _implicitDynamicCorrection); | 4893 _implicitDynamicCorrection); |
| 4894 | 4894 |
| 4895 static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = const StrongModeCode( | 4895 static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = const StrongModeCode( |
| 4896 ErrorType.COMPILE_TIME_ERROR, | 4896 ErrorType.COMPILE_TIME_ERROR, |
| 4897 'IMPLICIT_DYNAMIC_INVOKE', | 4897 'IMPLICIT_DYNAMIC_INVOKE', |
| 4898 "Missing type arguments for calling generic function type '{0}'.", | 4898 "Missing type arguments for calling generic function type '{0}'.", |
| 4899 _implicitDynamicCorrection); | 4899 _implicitDynamicCorrection); |
| 4900 | 4900 |
| 4901 static const StrongModeCode NOT_INSTANTIATED_BOUND = const StrongModeCode( |
| 4902 ErrorType.COMPILE_TIME_ERROR, |
| 4903 'NOT_INSTANTIATED_BOUND', |
| 4904 "Type parameter bound types must be instantiated.", |
| 4905 "Try adding type arguments."); |
| 4906 |
| 4901 static const StrongModeCode UNSAFE_BLOCK_CLOSURE_INFERENCE = const StrongModeC
ode( | 4907 static const StrongModeCode UNSAFE_BLOCK_CLOSURE_INFERENCE = const StrongModeC
ode( |
| 4902 ErrorType.STATIC_WARNING, | 4908 ErrorType.STATIC_WARNING, |
| 4903 'UNSAFE_BLOCK_CLOSURE_INFERENCE', | 4909 'UNSAFE_BLOCK_CLOSURE_INFERENCE', |
| 4904 "Unsafe use of a block closure in a type-inferred variable outside a funct
ion body.", | 4910 "Unsafe use of a block closure in a type-inferred variable outside a funct
ion body.", |
| 4905 "Try adding a type annotation for '{0}'. See dartbug.com/26947."); | 4911 "Try adding a type annotation for '{0}'. See dartbug.com/26947."); |
| 4906 | 4912 |
| 4907 @override | 4913 @override |
| 4908 final ErrorType type; | 4914 final ErrorType type; |
| 4909 | 4915 |
| 4910 /** | 4916 /** |
| 4911 * Initialize a newly created error code to have the given [type] and [name]. | 4917 * Initialize a newly created error code to have the given [type] and [name]. |
| 4912 * | 4918 * |
| 4913 * The message associated with the error will be created from the given | 4919 * The message associated with the error will be created from the given |
| 4914 * [message] template. The correction associated with the error will be | 4920 * [message] template. The correction associated with the error will be |
| 4915 * created from the optional [correction] template. | 4921 * created from the optional [correction] template. |
| 4916 */ | 4922 */ |
| 4917 const StrongModeCode(ErrorType type, String name, String message, | 4923 const StrongModeCode(ErrorType type, String name, String message, |
| 4918 [String correction]) | 4924 [String correction]) |
| 4919 : type = type, | 4925 : type = type, |
| 4920 super('STRONG_MODE_$name', message, correction); | 4926 super('STRONG_MODE_$name', message, correction); |
| 4921 | 4927 |
| 4922 @override | 4928 @override |
| 4923 ErrorSeverity get errorSeverity => type.severity; | 4929 ErrorSeverity get errorSeverity => type.severity; |
| 4924 } | 4930 } |
| OLD | NEW |