File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
lib/src/services/correction/dart
test/src/services/correction/fix Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,9 @@ class IgnoreDiagnosticOnLine extends AbstractIgnoreDiagnostic {
97
97
Future <void > compute (ChangeBuilder builder) async {
98
98
if (_isCodeUnignorable ()) return ;
99
99
100
+ final diagnostic = this .diagnostic! ; // Enforced by _isCodeUnignorable
100
101
final insertDesc = CorrectionUtils_InsertDesc ();
101
- insertDesc.offset = node .offset;
102
+ insertDesc.offset = diagnostic.problemMessage .offset;
102
103
await _computeEdit (
103
104
builder,
104
105
insertDesc,
Original file line number Diff line number Diff line change @@ -148,6 +148,18 @@ void f() {
148
148
''' );
149
149
}
150
150
151
+ Future <void > test_dartdoc_getter () async {
152
+ await resolveTestCode ('''
153
+ /// AA
154
+ String get _AA => '';
155
+ ''' );
156
+ await assertHasFix ('''
157
+ /// AA
158
+ // ignore: unused_element
159
+ String get _AA => '';
160
+ ''' );
161
+ }
162
+
151
163
Future <void > test_existingIgnore () async {
152
164
await resolveTestCode ('''
153
165
void f() {
You can’t perform that action at this time.
0 commit comments