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

[dart fix] Allow changing base class and mixins #51840

Open
goderbauer opened this issue Mar 23, 2023 · 3 comments
Open

[dart fix] Allow changing base class and mixins #51840

goderbauer opened this issue Mar 23, 2023 · 3 comments
Assignees
Labels
analyzer-data-driven-fixes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@goderbauer
Copy link
Contributor

For flutter/flutter#123352 I would like to write a dart fix that changes all classes extending RootRenderObjectElement to instead extend RenderObjectElement and mix in RootElementMixin.

Basically, I would like to write a fix that changes

class Foo extends RootRenderObjectElement { ... }

to

class Foo extends RenderObjectElement with RootElementMixin { ... }
@goderbauer
Copy link
Contributor Author

cc @bwilkerson

@mit-mit mit-mit added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Mar 24, 2023
@bwilkerson
Copy link
Member

Implementation note: I'd like to expand the capabilities of replacedBy to handle this case because it feels like we're replacing a class with another class and a mixin. I don't have a concrete proposal at this point for exactly how to do that.

@scheglov scheglov added the P3 A lower priority bug or feature request label Mar 24, 2023
@keertip keertip added the type-enhancement A request for a change that isn't a bug label Apr 18, 2023
@goderbauer
Copy link
Contributor Author

This came up again, but this time in the other direction where we would want to fix

class Foo extends RenderObjectWidget with SlottedMultiChildRenderObjectWidgetMixin<S> {
  // ...
}

to

class Foo extends SlottedMultiChildRenderObjectWidget<S> {
  // ...
}

@keertip keertip self-assigned this Jun 13, 2023
@keertip keertip removed the fixit-2023 label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-data-driven-fixes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants