Skip to content

An error occurred while handling textDocument/rename request #5496

Closed

Description

@dikatok

Renaming element name in iterable.map is not working

To Reproduce

  1. Call .map to an iterable like below.
final List<String> list = [];
final list2 = list.map((element) => element).toList();
  1. Rename the element to something else using F2 key.

  2. Nothing happens and there is a warning/error popup stating An error occurred while handling textDocument/rename request.

Expected behavior
Variable is renamed.

Screenshots

Image

Please complete the following information:

Dart Code extension: 3.109.20250404
Flutter extension: 3.109.20250401 (activated)

App: Visual Studio Code
App Host: desktop
Version: mac 1.99.3

Workspace type: Flutter (LSP)
Workspace name: tokowijaya

Dart (3.7.0): /Users/dikatok/flutter/bin/cache/dart-sdk
Flutter (3.29.1): /Users/dikatok/flutter (No device)

Activity

  1. DanTup commented on Apr 28, 2025

    @DanTup
    Member

    Thanks! This is an analysis server issue and it looks like it's already fixed in latest code (I can repro on stable, but not on master):

    The relevant SDK issue was dart-lang/sdk#60047.

    As it's part of the SDK, it'll ship in an upcoming Dart/Flutter release.

  2. added this to the v3.110.0 milestone on Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions