Skip to content

update unnecessary_const to not flag consts in case expressions (required for patterns migration) #59029

Closed
dart-archive/linter
#4050
@pq

Description

@pq

More context in https://github.com/dart-lang/linter/issues/4044.

TL;DR some fixes to support safe 3.0 migration will get flagged as having unnecessary_consts.

case const [1, 2]:
case const {'k': 'v'}:
case const {1, 2}:
case const Point(1, 2):

(but shouldn't.)

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresdevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-new-language-featurelinter-set-recommended

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions