| 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 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4712 * result of turning on a particular option, and they are free to turn it | 4712 * result of turning on a particular option, and they are free to turn it |
| 4713 * back off. | 4713 * back off. |
| 4714 */ | 4714 */ |
| 4715 static const String _implicitDynamicCorrection = | 4715 static const String _implicitDynamicCorrection = |
| 4716 "Try adding an explicit type like 'dynamic', or " | 4716 "Try adding an explicit type like 'dynamic', or " |
| 4717 "enable implicit-dynamic in your analysis options file."; | 4717 "enable implicit-dynamic in your analysis options file."; |
| 4718 | 4718 |
| 4719 static const String _inferredTypeMessage = "'{0}' has inferred type '{1}'."; | 4719 static const String _inferredTypeMessage = "'{0}' has inferred type '{1}'."; |
| 4720 | 4720 |
| 4721 static const StrongModeCode DOWN_CAST_COMPOSITE = const StrongModeCode( | 4721 static const StrongModeCode DOWN_CAST_COMPOSITE = const StrongModeCode( |
| 4722 ErrorType.STATIC_WARNING, | 4722 ErrorType.HINT, |
| 4723 'DOWN_CAST_COMPOSITE', | 4723 'DOWN_CAST_COMPOSITE', |
| 4724 _implicitCastMessage, | 4724 _implicitCastMessage, |
| 4725 _implicitCastCorrection); | 4725 _implicitCastCorrection); |
| 4726 | 4726 |
| 4727 static const StrongModeCode DOWN_CAST_IMPLICIT = const StrongModeCode( | 4727 static const StrongModeCode DOWN_CAST_IMPLICIT = const StrongModeCode( |
| 4728 ErrorType.HINT, | 4728 ErrorType.HINT, |
| 4729 'DOWN_CAST_IMPLICIT', | 4729 'DOWN_CAST_IMPLICIT', |
| 4730 _implicitCastMessage, | 4730 _implicitCastMessage, |
| 4731 _implicitCastCorrection); | 4731 _implicitCastCorrection); |
| 4732 | 4732 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4943 * created from the optional [correction] template. | 4943 * created from the optional [correction] template. |
| 4944 */ | 4944 */ |
| 4945 const StrongModeCode(ErrorType type, String name, String message, | 4945 const StrongModeCode(ErrorType type, String name, String message, |
| 4946 [String correction]) | 4946 [String correction]) |
| 4947 : type = type, | 4947 : type = type, |
| 4948 super('STRONG_MODE_$name', message, correction); | 4948 super('STRONG_MODE_$name', message, correction); |
| 4949 | 4949 |
| 4950 @override | 4950 @override |
| 4951 ErrorSeverity get errorSeverity => type.severity; | 4951 ErrorSeverity get errorSeverity => type.severity; |
| 4952 } | 4952 } |
| OLD | NEW |