Skip to content

address false positives in "make late" quick fix  #44534

@pq

Description

@pq

Followup from https://dart-review.googlesource.com/c/sdk/+/176900/2..3/pkg/analysis_server/test/src/services/correction/fix/add_late_test.dart#57.

In a.dart:

class C {
  final String s;
}

In b.dart:

import 'a.dart';

void f(C c) {
  c.s = '';
}

The diagnostic will be reported in b.dart but the edit needs to be applied to a.dart (or disallowed).

... different parts would have the same problem as different libraries and should also be tested ...

In a.dart:

part 'b.dart';

class C {
  final String s;
}

In b.dart:

part of 'a.dart';

void f(C c) {
  c.s = '';
}

Again, the diagnostic will be reported in b.dart but the edit needs to be applied to a.dart.

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD ReleaseP2A bug or feature request we're likely to work ondevexp-quick-fixIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions