Skip to content

"Inline local variable" adds extra parens to switch expression #4732

Closed
@lukehutch

Description

@lukehutch

Describe the bug

Before:

image

Choose "Inline local variable":

image

After:

image

There are extra (unnecessary) parens added inside the existing switch expression parens.

To Reproduce

As above

Expected behavior

The result should be

image

Please complete the following information:

  • Operating System and version: Linux
  • VS Code version: Latest public release
  • Dart extension version: Latest public release
  • Dart/Flutter SDK version: Latest public release
  • Target device (if the issue relates to Flutter debugging):

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions