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.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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 "return statement.", | 352 "return statement.", |
353 "Try adding a return statement, or changing the return type to 'void'."); | 353 "Try adding a return statement, or changing the return type to 'void'."); |
354 | 354 |
355 /** | 355 /** |
356 * Generate a hint for classes that inherit from classes annotated with | 356 * Generate a hint for classes that inherit from classes annotated with |
357 * `@immutable` but that are not immutable. | 357 * `@immutable` but that are not immutable. |
358 */ | 358 */ |
359 static const HintCode MUST_BE_IMMUTABLE = const HintCode( | 359 static const HintCode MUST_BE_IMMUTABLE = const HintCode( |
360 'MUST_BE_IMMUTABLE', | 360 'MUST_BE_IMMUTABLE', |
361 "This class inherits from a class marked as @immutable, " | 361 "This class inherits from a class marked as @immutable, " |
362 "and therefore should be immutable (all fields must be final)."); | 362 "and therefore should be immutable (all instance fields must be final)."); |
363 | 363 |
364 /** | 364 /** |
365 * Generate a hint for methods that override methods annotated `@mustCallSuper
` | 365 * Generate a hint for methods that override methods annotated `@mustCallSuper
` |
366 * that do not invoke the overridden super method. | 366 * that do not invoke the overridden super method. |
367 * | 367 * |
368 * Parameters: | 368 * Parameters: |
369 * 0: the name of the class declaring the overridden method | 369 * 0: the name of the class declaring the overridden method |
370 */ | 370 */ |
371 static const HintCode MUST_CALL_SUPER = const HintCode( | 371 static const HintCode MUST_CALL_SUPER = const HintCode( |
372 'MUST_CALL_SUPER', | 372 'MUST_CALL_SUPER', |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 */ | 651 */ |
652 const HintCode(String name, String message, [String correction]) | 652 const HintCode(String name, String message, [String correction]) |
653 : super(name, message, correction); | 653 : super(name, message, correction); |
654 | 654 |
655 @override | 655 @override |
656 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 656 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
657 | 657 |
658 @override | 658 @override |
659 ErrorType get type => ErrorType.HINT; | 659 ErrorType get type => ErrorType.HINT; |
660 } | 660 } |
OLD | NEW |