sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[analyzer] Missing suggestions on deconstructed variables doing for-each loop

Open julemand101 opened this issue 2 years ago • 0 comments

With the following piece of code:

void main() {
  int aValueAnother = 5;
  int bValueAnother = 5;

  for (var (int aValue, :bValue) in test()) {
    
  }
}

List<(int, {int bValue})> test() => [(1, bValue: 2)];

I can't get any auto completion / suggestions for the either aValue and/or bValue. image image

Tested with the following Dart releases:

Dart SDK version: 3.0.4 (stable) (Wed Jun 7 14:55:32 2023 +0000) on "windows_x64"
Dart SDK version: 3.1.0-268.0.dev (dev) (Fri Jun 30 17:04:24 2023 -0700) on "windows_x64"

With both:

  • IntelliJ IDEA 2023.1.3 (Community Edition) - Dart plugin version 231.9161.14
  • VSCode 1.79.0 - Dart plugin v3.68.1

julemand101 avatar Jul 05 '23 15:07 julemand101