Skip to content

extract local variable should define the variable using final/const not var #46536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tjx666 opened this issue Jul 1, 2021 · 1 comment
Closed
Labels
legacy-area-analyzer Use area-devexp instead.

Comments

@tjx666
Copy link

tjx666 commented Jul 1, 2021

This tracker is for issues related to:

  • Analyzer

Describe the bug

extract local variable should define the variable using final/const not var

Jul-01-2021 15-53-52

Expected behavior

Normally, the express should be defined to final, because they are using only once.
Sometimes, like following example, should be defined to constant:

image

  • Dart SDK Version (dart --version): 2.2.2
  • Whether you are using Windows, MacOSX, or Linux (if applicable): MacOSX Big Sur 11.4
@lrhn lrhn added the legacy-area-analyzer Use area-devexp instead. label Jul 5, 2021
@srawlins
Copy link
Member

Duplicate of #31701

@srawlins srawlins marked this as a duplicate of #31701 Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

3 participants