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

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

Issue 2643073002: Deprecate the use of `Function` as a class. (Closed)
Patch Set: Update type. Created 3 years, 11 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 | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.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.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 * 88 *
89 * Parameters: 89 * Parameters:
90 * 0: the name of the member 90 * 0: the name of the member
91 */ 91 */
92 static const HintCode DEPRECATED_MEMBER_USE = const HintCode( 92 static const HintCode DEPRECATED_MEMBER_USE = const HintCode(
93 'DEPRECATED_MEMBER_USE', 93 'DEPRECATED_MEMBER_USE',
94 "'{0}' is deprecated and shouldn't be used.", 94 "'{0}' is deprecated and shouldn't be used.",
95 "Try replacing the use of the deprecated member with the replacement."); 95 "Try replacing the use of the deprecated member with the replacement.");
96 96
97 /** 97 /**
98 * Users should not create a class named `Function` anymore.
99 */
100 static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = const HintCode(
101 'DEPRECATED_FUNCTION_CLASS_DECLARATION',
102 "Declaring a class named 'Function' is deprecated.",
103 "Try renaming the class.");
104
105 /**
106 * `Function` should not be extended anymore.
107 */
108 static const HintCode DEPRECATED_EXTENDS_FUNCTION = const HintCode(
109 'DEPRECATED_EXTENDS_FUNCTION',
110 "Extending 'Function' is deprecated.",
111 "Try removing 'Function' from the 'extends' clause.");
112
113 /**
114 * `Function` should not be mixed in anymore.
115 */
116 static const HintCode DEPRECATED_MIXIN_FUNCTION = const HintCode(
117 'DEPRECATED_MIXIN_FUNCTION',
118 "Mixing in 'Function' is deprecated.",
119 "Try removing 'Function' from the 'with' clause.");
120
121 /**
98 * Hint to use the ~/ operator. 122 * Hint to use the ~/ operator.
99 */ 123 */
100 static const HintCode DIVISION_OPTIMIZATION = const HintCode( 124 static const HintCode DIVISION_OPTIMIZATION = const HintCode(
101 'DIVISION_OPTIMIZATION', 125 'DIVISION_OPTIMIZATION',
102 "The operator x ~/ y is more efficient than (x / y).toInt().", 126 "The operator x ~/ y is more efficient than (x / y).toInt().",
103 "Try re-writing the expression to use the '~/' operator."); 127 "Try re-writing the expression to use the '~/' operator.");
104 128
105 /** 129 /**
106 * Duplicate imports. 130 * Duplicate imports.
107 */ 131 */
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 */ 636 */
613 const HintCode(String name, String message, [String correction]) 637 const HintCode(String name, String message, [String correction])
614 : super(name, message, correction); 638 : super(name, message, correction);
615 639
616 @override 640 @override
617 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; 641 ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
618 642
619 @override 643 @override
620 ErrorType get type => ErrorType.HINT; 644 ErrorType get type => ErrorType.HINT;
621 } 645 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698