Skip to content

Autocomplete/IntelliSense does not work for functions that return a record with named fields when using an expression body. #5162

Closed

Description

@GiancarloCante

Describe the bug
Autocomplete/IntelliSense does not work for functions that return a record with named fields when using an expression body.

Expression body:
image
Block body:
image

To Reproduce

void fun(({int anInt}) Function() callback) {}

void main() {
  fun(() => ());

  fun(() {
    return ();
  });
}

Trigger the autocompletion inside the returned record and you can see that only show the suggestions in the block body, and not in expression body.

Expected behavior
Should show the named fields suggestions.

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

Dart Code extension: 3.90.0
Flutter extension: 3.90.0
Dart: 3.4.1
Flutter: 3.22.1

Activity

  1. added this to the v3.94.0 milestone on Jul 4, 2024
  2. added
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Jul 4, 2024
  3. DanTup commented on Jul 4, 2024

    @DanTup
    Member
  4. DanTup commented on Jul 10, 2024

    @DanTup
    Member

    Fixed by dart-lang/sdk@96a7c6a. The change is in the Dart analysis server so will show up in a Future Dart SDK release (not a Dart-Code release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in 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