Skip to content

Folding of function's body fails when it has named parameters in dart #162300

@Hexagonale

Description

@Hexagonale

Does this issue occur when all extensions are disabled?: No

  • VS Code Version: 1.70 (July)
  • OS Version: Mac OS 12.3 (ARM)

Steps to Reproduce:

  1. Install Dart extension
  2. Create this file:
void functionWithNamedParameters({
  required String parameter1,
  required String parameter2,
}) {
  print('parameter1: $parameter1');
  print('parameter2: $parameter2');

  print('I cannot fold in 1.70, but I can in 1.60!');
}

When I use 1.69 (June) version folding works as expected:
Screen Shot 2022-09-29 at 08 38 51

When I use 1.70 (July) version folding of function's body is impossible (only one arrow / chevron is visible):
Screen Shot 2022-09-29 at 08 39 09
And it results in this:
Screen Shot 2022-09-29 at 09 52 24

With Insider version it fails as well:
Screen Shot 2022-09-29 at 08 45 26

When I disable Dart extension it works, but when I roll back to the old version of extension it still does not work. So my understanding is that 1.70 broke some API that Dart uses to fold the code (since folding is handled by the Dart engine).

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions