Skip to content

Completing a method/constructor name with no typed prefix inserts parenthesis even if already present #3672

@caseyryan

Description

@caseyryan

Describe the bug
v3.28.0 Places odd braces on autocompletion where there is already an existing pair

To Reproduce
Steps to reproduce the behavior:
Write some code like

Container(
  child: Padding(
    padding: EdgeInsets.all(8.0),
    child: Column(
      children: [
        
      ],
    ),
  ),
)
  1. erase "all" constructor name and type, e.g. symm
  2. When it prompts "symmetric" press enter to autocomplete it
  3. You will see odd pair of braces like this and the cursor between them
Container(
 child: Padding(
   padding: EdgeInsets.symmetric()(8.0),
   child: Column(
     children: [
       
     ],
   ),
 ),
)

Expected behavior
No braces added because there is already a pair of them right next to the prompted code
in this case with (8.0) inside

Screenshots

2021-11-16.19.04.55.mov

Versions (please complete the following information):

  • VS Code version: 1.62.2
  • Dart extension version: v3.28.0
  • Dart/Flutter SDK version: Dart 2.13.4 (stable), Flutter 2.2.3 (stable)

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 bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions