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

Side by Side Diff: pkg/analyzer/lib/src/error/codes.dart

Issue 2738223002: Reland "Turn the DOWN_CAST_COMPOSITE strong mode error into a hint, which will" (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4715 matching lines...) Expand 10 before | Expand all | Expand 10 after
4726 * result of turning on a particular option, and they are free to turn it 4726 * result of turning on a particular option, and they are free to turn it
4727 * back off. 4727 * back off.
4728 */ 4728 */
4729 static const String _implicitDynamicCorrection = 4729 static const String _implicitDynamicCorrection =
4730 "Try adding an explicit type like 'dynamic', or " 4730 "Try adding an explicit type like 'dynamic', or "
4731 "enable implicit-dynamic in your analysis options file."; 4731 "enable implicit-dynamic in your analysis options file.";
4732 4732
4733 static const String _inferredTypeMessage = "'{0}' has inferred type '{1}'."; 4733 static const String _inferredTypeMessage = "'{0}' has inferred type '{1}'.";
4734 4734
4735 static const StrongModeCode DOWN_CAST_COMPOSITE = const StrongModeCode( 4735 static const StrongModeCode DOWN_CAST_COMPOSITE = const StrongModeCode(
4736 ErrorType.STATIC_WARNING, 4736 ErrorType.HINT,
4737 'DOWN_CAST_COMPOSITE', 4737 'DOWN_CAST_COMPOSITE',
4738 _implicitCastMessage, 4738 _implicitCastMessage,
4739 _implicitCastCorrection); 4739 _implicitCastCorrection);
4740 4740
4741 static const StrongModeCode DOWN_CAST_IMPLICIT = const StrongModeCode( 4741 static const StrongModeCode DOWN_CAST_IMPLICIT = const StrongModeCode(
4742 ErrorType.HINT, 4742 ErrorType.HINT,
4743 'DOWN_CAST_IMPLICIT', 4743 'DOWN_CAST_IMPLICIT',
4744 _implicitCastMessage, 4744 _implicitCastMessage,
4745 _implicitCastCorrection); 4745 _implicitCastCorrection);
4746 4746
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
4957 * created from the optional [correction] template. 4957 * created from the optional [correction] template.
4958 */ 4958 */
4959 const StrongModeCode(ErrorType type, String name, String message, 4959 const StrongModeCode(ErrorType type, String name, String message,
4960 [String correction]) 4960 [String correction])
4961 : type = type, 4961 : type = type,
4962 super('STRONG_MODE_$name', message, correction); 4962 super('STRONG_MODE_$name', message, correction);
4963 4963
4964 @override 4964 @override
4965 ErrorSeverity get errorSeverity => type.severity; 4965 ErrorSeverity get errorSeverity => type.severity;
4966 } 4966 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698