Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConstructorDefinitionBuilder.augment cannot augment factory constructor #55636

Open
blaugold opened this issue May 3, 2024 · 0 comments
Open
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-macros Implementation of the macros feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@blaugold
Copy link
Contributor

blaugold commented May 3, 2024

When I try to use ConstructorDefinitionBuilder.augment with a previously declared factory constructor, I get the following error for the augmentation: All final variables must be initialized, but 'bar', 'buzz', and 2 others aren't. Try adding initializers for the fields.

Here is the generated code:

augment class A {
  external factory A.readJson(prefix0.JsonReader reader);

  augment A.readJson(prefix0.JsonReader reader, ) {
    ...
  }
}
@lrhn lrhn added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-macros Implementation of the macros feature labels May 7, 2024
@srawlins srawlins added type-enhancement A request for a change that isn't a bug P2 A bug or feature request we're likely to work on labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. feature-macros Implementation of the macros feature P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
Development

No branches or pull requests

3 participants