sdk icon indicating copy to clipboard operation
sdk copied to clipboard

`Add final initializing formal (required named) parameters` invalid code and missing cases

Open FMorschel opened this issue 3 days ago • 2 comments

Repro:

class C {
  C();
  C._();
  C.named();

  final int field;
}
  1. Only the first constructor shows Add final initializing formal (required named) parameters (maybe it doesn't know how to handle named constructors somehow?)
  2. The required, named version doesn't add the initial { if it isn't present, leading to invalid code

CC @bwilkerson

FMorschel avatar Dec 08 '25 20:12 FMorschel