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

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

Issue 3004113002: Revert "Add a hint on static uses of fuzzy arrows." (Closed)
Patch Set: Created 3 years, 3 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
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.dart.error.hint_codes; 5 library analyzer.src.dart.error.hint_codes;
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/src/dart/element/element.dart'; 8 import 'package:analyzer/src/dart/element/element.dart';
9 9
10 /** 10 /**
(...skipping 20 matching lines...) Expand all
31 * 31 *
32 * Parameters: 32 * Parameters:
33 * 0: the name of the actual argument type 33 * 0: the name of the actual argument type
34 * 1: the name of the expected type 34 * 1: the name of the expected type
35 */ 35 */
36 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( 36 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode(
37 'ARGUMENT_TYPE_NOT_ASSIGNABLE', 37 'ARGUMENT_TYPE_NOT_ASSIGNABLE',
38 "The argument type '{0}' can't be assigned to the parameter type '{1}'."); 38 "The argument type '{0}' can't be assigned to the parameter type '{1}'.");
39 39
40 /** 40 /**
41 * This hint is generated when a function type is assigned to a function
42 * typed location, and the assignment will be invalid after fuzzy arrows
43 * (the treatment of dynamic as bottom in certain locations) is removed.
44 *
45 */
46 static const HintCode USES_DYNAMIC_AS_BOTTOM = const HintCode(
47 'USES_DYNAMIC_AS_BOTTOM',
48 "A function of type '{0}' can't be assigned to a variable of type '{1}'.",
49 "Try changing the type of the function, or "
50 "casting the right-hand type to '{1}'.");
51
52 /**
53 * When the target expression uses '?.' operator, it can be `null`, so all the 41 * When the target expression uses '?.' operator, it can be `null`, so all the
54 * subsequent invocations should also use '?.' operator. 42 * subsequent invocations should also use '?.' operator.
55 */ 43 */
56 static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = const HintCode( 44 static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = const HintCode(
57 'CAN_BE_NULL_AFTER_NULL_AWARE', 45 'CAN_BE_NULL_AFTER_NULL_AWARE',
58 "The target expression uses '?.', so its value can be null.", 46 "The target expression uses '?.', so its value can be null.",
59 "Replace the '.' with a '?.' in the invocation."); 47 "Replace the '.' with a '?.' in the invocation.");
60 48
61 /** 49 /**
62 * Dead code is code that is never reached, this can happen for instance if a 50 * Dead code is code that is never reached, this can happen for instance if a
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 */ 673 */
686 const HintCode(String name, String message, [String correction]) 674 const HintCode(String name, String message, [String correction])
687 : super(name, message, correction); 675 : super(name, message, correction);
688 676
689 @override 677 @override
690 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; 678 ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
691 679
692 @override 680 @override
693 ErrorType get type => ErrorType.HINT; 681 ErrorType get type => ErrorType.HINT;
694 } 682 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698