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.generated.error; | 5 library analyzer.src.generated.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; | 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; |
10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 3515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3526 * | 3526 * |
3527 * Parameters: | 3527 * Parameters: |
3528 * 0: the name of the right hand side type | 3528 * 0: the name of the right hand side type |
3529 * 1: the name of the left hand side type | 3529 * 1: the name of the left hand side type |
3530 */ | 3530 */ |
3531 static const HintCode INVALID_ASSIGNMENT = const HintCode( | 3531 static const HintCode INVALID_ASSIGNMENT = const HintCode( |
3532 'INVALID_ASSIGNMENT', | 3532 'INVALID_ASSIGNMENT', |
3533 "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); | 3533 "A value of type '{0}' cannot be assigned to a variable of type '{1}'"); |
3534 | 3534 |
3535 /** | 3535 /** |
| 3536 * This hint is generated anywhere where a member annotated with `@protected` |
| 3537 * is used outside an instance member of a subclass. |
| 3538 * |
| 3539 * Parameters: |
| 3540 * 0: the name of the member |
| 3541 * 1: the name of the defining class |
| 3542 */ |
| 3543 static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = const HintCode( |
| 3544 'INVALID_USE_OF_PROTECTED_MEMBER', |
| 3545 "The member '{0}' can only be used within instance members of subclasses o
f '{1}'"); |
| 3546 |
| 3547 /** |
3536 * Generate a hint for methods or functions that have a return type, but do | 3548 * Generate a hint for methods or functions that have a return type, but do |
3537 * not have a non-void return statement on all branches. At the end of methods | 3549 * not have a non-void return statement on all branches. At the end of methods |
3538 * or functions with no return, Dart implicitly returns `null`, avoiding these | 3550 * or functions with no return, Dart implicitly returns `null`, avoiding these |
3539 * implicit returns is considered a best practice. | 3551 * implicit returns is considered a best practice. |
3540 * | 3552 * |
3541 * Parameters: | 3553 * Parameters: |
3542 * 0: the name of the declared return type | 3554 * 0: the name of the declared return type |
3543 */ | 3555 */ |
3544 static const HintCode MISSING_RETURN = const HintCode( | 3556 static const HintCode MISSING_RETURN = const HintCode( |
3545 'MISSING_RETURN', | 3557 'MISSING_RETURN', |
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5691 * Initialize a newly created error code to have the given [name]. | 5703 * Initialize a newly created error code to have the given [name]. |
5692 */ | 5704 */ |
5693 const TodoCode(String name) : super(name, "{0}"); | 5705 const TodoCode(String name) : super(name, "{0}"); |
5694 | 5706 |
5695 @override | 5707 @override |
5696 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5708 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
5697 | 5709 |
5698 @override | 5710 @override |
5699 ErrorType get type => ErrorType.TODO; | 5711 ErrorType get type => ErrorType.TODO; |
5700 } | 5712 } |
OLD | NEW |