code_builder icon indicating copy to clipboard operation
code_builder copied to clipboard

Support newInstanceNamed with empty name

Open mattrbeck opened this issue 1 year ago • 0 comments

Opts to rewrite refer('Foo').newInstanceNamed('', []) as Foo rather than Foo.. Two primary reasons

  1. Foo. breaks compilation with bad error messages
  2. Analyzer's ConstructorElement#name is a non-nullable String, which pushes the isEmpty check to user code

  • [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.

mattrbeck avatar Jun 06 '24 23:06 mattrbeck