dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.28k stars 1.58k forks source link

Create method assist doesn't trigger inside records with a `Function` type value #58266

Open FMorschel opened 2 days ago

FMorschel commented 2 days ago

Repro:

class C {
  void foo(({void Function(int value) function}) record) {}

  void bar() {
    foo((function: _baz));
  }
}

This doesn't work with named or unnamed values.

Similar to https://github.com/dart-lang/sdk/issues/56719.

I volunteer to fix this.

dart-github-bot commented 2 days ago

Summary: Method assist for function-typed record fields doesn't trigger. This prevents code completion within record literals containing functions.

FMorschel commented 1 day ago

https://dart-review.googlesource.com/c/sdk/+/396561