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 import 'package:analyzer/src/dart/element/element.dart'; | 8 import 'package:analyzer/src/dart/element/element.dart'; |
9 | 9 |
10 /** | 10 /** |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 @override | 2197 @override |
2198 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 2198 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
2199 } | 2199 } |
2200 | 2200 |
2201 /** | 2201 /** |
2202 * The hints and coding recommendations for best practices which are not | 2202 * The hints and coding recommendations for best practices which are not |
2203 * mentioned in the Dart Language Specification. | 2203 * mentioned in the Dart Language Specification. |
2204 */ | 2204 */ |
2205 class HintCode extends ErrorCode { | 2205 class HintCode extends ErrorCode { |
2206 /** | 2206 /** |
| 2207 * When an abstract supertype member is references with `super` as its target, |
| 2208 * it cannot be overridden, so it is always a runtime error. |
| 2209 * |
| 2210 * Parameters: |
| 2211 * 0: the display name for the kind of the referenced element |
| 2212 * 1: the name of the referenced element |
| 2213 */ |
| 2214 static const HintCode ABSTRACT_SUPER_MEMBER_REFERENCE = const HintCode( |
| 2215 'ABSTRACT_SUPER_MEMBER_REFERENCE', |
| 2216 "The {0} '{1}' is always abstract in the supertype.", |
| 2217 null); |
| 2218 |
| 2219 /** |
2207 * This hint is generated anywhere where the | 2220 * This hint is generated anywhere where the |
2208 * [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE] would have been generated, | 2221 * [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE] would have been generated, |
2209 * if we used propagated information for the warnings. | 2222 * if we used propagated information for the warnings. |
2210 * | 2223 * |
2211 * Parameters: | 2224 * Parameters: |
2212 * 0: the name of the actual argument type | 2225 * 0: the name of the actual argument type |
2213 * 1: the name of the expected type | 2226 * 1: the name of the expected type |
2214 */ | 2227 */ |
2215 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( | 2228 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( |
2216 'ARGUMENT_TYPE_NOT_ASSIGNABLE', | 2229 'ARGUMENT_TYPE_NOT_ASSIGNABLE', |
(...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4849 * Initialize a newly created error code to have the given [name]. | 4862 * Initialize a newly created error code to have the given [name]. |
4850 */ | 4863 */ |
4851 const TodoCode(String name) : super(name, "{0}"); | 4864 const TodoCode(String name) : super(name, "{0}"); |
4852 | 4865 |
4853 @override | 4866 @override |
4854 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4867 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
4855 | 4868 |
4856 @override | 4869 @override |
4857 ErrorType get type => ErrorType.TODO; | 4870 ErrorType get type => ErrorType.TODO; |
4858 } | 4871 } |
OLD | NEW |