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

Respect Dart 3 class modifiers when treating an interface "required" #130

Open
devmil opened this issue Mar 20, 2023 · 0 comments
Open

Respect Dart 3 class modifiers when treating an interface "required" #130

devmil opened this issue Mar 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@devmil
Copy link
Member

devmil commented Mar 20, 2023

Is your feature request related to a problem? Please describe.
Dart 3 introduces sealed classes.
Classes that are marked as sealed are not meant to be implemented on the consumer side of a package and therefore shouldn't be treated as required interfaces.
Additionally there are more new modifiers for classes that exclude them from being "required" (https://github.com/dart-lang/language/blob/master/accepted/future-releases/class-modifiers/feature-specification.md):

  • final: prevents extension from outside

Describe the solution you'd like
If a class is marked as sealed (or can't be extended by the consumer because of any of the new modifiers) then it should not be treated as required interface when passed into the API.

@devmil devmil added the enhancement New feature or request label Mar 20, 2023
@devmil devmil changed the title Respect sealed attribute when treating an interface "required" Respect sealed attribute when treating an interface "required" (Dart 3) Mar 20, 2023
@devmil devmil changed the title Respect sealed attribute when treating an interface "required" (Dart 3) Respect Dart 3 class modifiers when treating an interface "required" Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant