Skip to content

prefer_final_parameters should not flag params used in destructured patternsย #59073

Closed
@srawlins

Description

@srawlins

Child issue of #58837 I suppose.

I think there should be a test case like:

void f(int two) {
  var list = [1, 2, 3];
  var [_, two, _] = list;
}

in which the lint rule would not report that final should be preferred for two.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.linter-new-language-feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions