| Index: pkg/analyzer/test/generated/hint_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
|
| index 39752705c06ccf3780e8a592c3452bb3a52d2117..14b46d7805634829eea997aa4ec82d2173a14440 100644
|
| --- a/pkg/analyzer/test/generated/hint_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/hint_code_test.dart
|
| @@ -2886,6 +2886,30 @@ class A {
|
| verify([source]);
|
| }
|
|
|
| + void test_unusedField_notUsed_constructorFieldInitializers() {
|
| + enableUnusedElement = true;
|
| + Source source = addSource(r'''
|
| +class A {
|
| + int _f;
|
| + A() : _f = 0;
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [HintCode.UNUSED_FIELD]);
|
| + verify([source]);
|
| + }
|
| +
|
| + void test_unusedField_notUsed_fieldFormalParameter() {
|
| + enableUnusedElement = true;
|
| + Source source = addSource(r'''
|
| +class A {
|
| + int _f;
|
| + A(this._f);
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [HintCode.UNUSED_FIELD]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_unusedField_notUsed_noReference() {
|
| enableUnusedElement = true;
|
| Source source = addSource(r'''
|
|
|