Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Conversation

srawlins
Copy link
Contributor

Fixes dart-lang/sdk#59219

This involved a sizeable refactoring, with a few improvements:

  • Visit parts in order to find mutations of private fields.
  • More idiomatic/readable extension getters.
  • Store less fields-which-have-been-mutated. The previous impl stored all fields every mutated in a library, including fields never declared in the library. This new impl stores only local field elements.
  • Do not declare local functions in a for-loop; this should allocate many fewer short-lived objects (_Closures).

@github-actions github-actions bot added the linter-set-recommended Affects a rule in the recommended Dart rule set label Jul 16, 2023
@coveralls
Copy link

coveralls commented Jul 16, 2023

Coverage Status

coverage: 96.731% (+0.001%) from 96.73% when pulling 9a39bf3 on prefer-final-fields-part into e366797 on main.

@srawlins srawlins merged commit ad42f65 into main Jul 17, 2023
@srawlins srawlins deleted the prefer-final-fields-part branch July 17, 2023 18:01
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter-set-recommended Affects a rule in the recommended Dart rule set
Development

Successfully merging this pull request may close these issues.

prefer_final_fields incorrectly warns in part of scenario
3 participants