Skip to content

Not able to "Go to Type Definition" in for-in loop variable #5205

@FMorschel

Description

@FMorschel

Describe the bug
Not being able to "Go to Type Definition" in for-in loop variable.

To Reproduce

void main() {
  const list = [1, 2, 3];
  for (final value in list) {
    
  }
}

Steps to reproduce the behavior:

  1. Create an empty project
  2. Add the code sample
  3. Press the second mouse button on the value variable to see the tooltip
  4. Click "Go to Type Definition"
  5. See message No type definition found for 'value'

Expected behavior
To be able to see type definition on anything that has a type.

Screenshots
image

Please complete the following information:

Workspace Environment
Dart Code extension: 3.93.20240723
Flutter extension: 3.93.20240702 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.91.1

Workspace type: Dart (LSP)
Workspace name: bug

Dart (3.6.0-36.0.dev): C:\Users\felip_0vh5fa6\.puro\shared\caches\850e0c1b16c3676c5b3da9bc7aa64fc165527c1d\dart-sdk
Flutter (undefined): C:\Users\felip_0vh5fa6\.puro\envs\master\flutter (No device)

Output from 'dart info'

C:\Users\felip_0vh5fa6\.puro\shared\caches\850e0c1b16c3676c5b3da9bc7aa64fc165527c1d\dart-sdk\bin\dart.exe info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.6.0-36.0.dev (dev) (Fri Jul 12 09:05:30 2024 -0700) on "windows_x64"
  • on windows / "Windows 10 Pro" 10.0 (Build 22631)
  • locale is pt-BR

Project info

  • sdk constraint: '>=3.3.0 <4.0.0'
  • dependencies: test
  • dev_dependencies: dart_code_metrics, lints

Process info

Memory CPU Elapsed time Command line
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe
0 MB -- dart.exe

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