-
Notifications
You must be signed in to change notification settings - Fork 107
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
LibraryReader.classElements should include enums #388
Comments
I think it could be considered breaking to start including enums in the result for |
natebosch
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #388 Deprecate the `classElements` getter since it is ambiguous, both classes and enums are represented by `ClassElement` in analyzer, but we don't want to exclusively always mix them in this interface. Add the name `classes` to be more specific. Add an implementation for `enums.`
Merged
natebosch
added a commit
that referenced
this issue
Dec 12, 2018
Fixes #388 Deprecate the `classElements` getter since it is ambiguous, both classes and enums are represented by `ClassElement` in analyzer, but we don't want to exclusively always mix them in this interface. Add the name `classes` to be more specific. Add an implementation for `enums.`
mosuem
pushed a commit
to dart-lang/build
that referenced
this issue
Dec 10, 2024
Fixes dart-lang/source_gen#388 Deprecate the `classElements` getter since it is ambiguous, both classes and enums are represented by `ClassElement` in analyzer, but we don't want to exclusively always mix them in this interface. Add the name `classes` to be more specific. Add an implementation for `enums.`
mosuem
pushed a commit
to dart-lang/build
that referenced
this issue
Dec 10, 2024
Fixes dart-lang/source_gen#388 Deprecate the `classElements` getter since it is ambiguous, both classes and enums are represented by `ClassElement` in analyzer, but we don't want to exclusively always mix them in this interface. Add the name `classes` to be more specific. Add an implementation for `enums.`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The iterable obtained from
LibraryReader.classElements
does not contain enum classes defined in the respective compilation unit. Given that enums are also represented with aClassElement
from the analyzer, I would expect them to be included.I see that the documentation specifically points out that
class
elements defined in the library will be returned, but I think that this makes the nameclassElements
a bit confusing. Perhaps there should be a getterclasses
, one forenums
and one for both?The text was updated successfully, but these errors were encountered: