Skip to content

IDE quick fixes using spread and if #35867

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
munificent opened this issue Feb 6, 2019 · 1 comment
Closed

IDE quick fixes using spread and if #35867

munificent opened this issue Feb 6, 2019 · 1 comment
Assignees
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@munificent
Copy link
Member

Here are a couple more patterns I see in code that could be automatically fixed to use the upcoming spread and control flow collection syntax:

// From:
[<stuff>]..addAll(condition ? things : const [])
[<stuff>]..addAll(condition ? things : [])
// To:
[<stuff>, if (condition) ...things]

// ---

// From:
[<stuff>]..addAll(things ?? const [])
[<stuff>]..addAll(things ?? [])
// To:
[<stuff>, ...?things]
@munificent munificent added legacy-area-analyzer Use area-devexp instead. devexp-quick-fix Issues with analysis server (quick) fixes labels Feb 6, 2019
@stereotype441 stereotype441 added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug labels Feb 6, 2019
@bwilkerson bwilkerson self-assigned this Feb 6, 2019
@bwilkerson
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants