| 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 /** | |
| 2220 * This hint is generated anywhere where the | 2207 * This hint is generated anywhere where the |
| 2221 * [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE] would have been generated, | 2208 * [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE] would have been generated, |
| 2222 * if we used propagated information for the warnings. | 2209 * if we used propagated information for the warnings. |
| 2223 * | 2210 * |
| 2224 * Parameters: | 2211 * Parameters: |
| 2225 * 0: the name of the actual argument type | 2212 * 0: the name of the actual argument type |
| 2226 * 1: the name of the expected type | 2213 * 1: the name of the expected type |
| 2227 */ | 2214 */ |
| 2228 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( | 2215 static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode( |
| 2229 'ARGUMENT_TYPE_NOT_ASSIGNABLE', | 2216 'ARGUMENT_TYPE_NOT_ASSIGNABLE', |
| (...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4865 * Initialize a newly created error code to have the given [name]. | 4852 * Initialize a newly created error code to have the given [name]. |
| 4866 */ | 4853 */ |
| 4867 const TodoCode(String name) : super(name, "{0}"); | 4854 const TodoCode(String name) : super(name, "{0}"); |
| 4868 | 4855 |
| 4869 @override | 4856 @override |
| 4870 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4857 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 4871 | 4858 |
| 4872 @override | 4859 @override |
| 4873 ErrorType get type => ErrorType.TODO; | 4860 ErrorType get type => ErrorType.TODO; |
| 4874 } | 4861 } |
| OLD | NEW |