Skip to content

Can't get inherited types from Quotes #14902

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

Closed
pikinier20 opened this issue Apr 11, 2022 · 1 comment · Fixed by #15033
Closed

Can't get inherited types from Quotes #14902

pikinier20 opened this issue Apr 11, 2022 · 1 comment · Fixed by #15033
Assignees
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API itype:bug
Milestone

Comments

@pikinier20
Copy link
Contributor

pikinier20 commented Apr 11, 2022

Compiler version

2ec9c52

Minimized code

Having a symbol of a class, we can retrieve from compiler API the information about:

  • declared methods
  • declared + inherited methods
  • declared fields
  • declared + inherited fields
  • declared types

However, we can't retrieve information about inherited types.

Expectation

Looking at the API, I'm not sure if it's not a oversight since there's a naming convention:

  • declaredMethods - methods declared in a class
  • methodMembers - methods declared in a class and inherited
  • declaredFields - fields declared in a class
  • fieldMembers - fields declared in a class and inherited

And the method: typeMembers breaks the convention since it returns only declared types.

Aren't we missing this method?

@pikinier20 pikinier20 added itype:question area:metaprogramming:quotes Issues related to quotes and splices labels Apr 11, 2022
@nicolasstucki nicolasstucki added area:metaprogramming:reflection Issues related to the quotes reflection API and removed area:metaprogramming:quotes Issues related to quotes and splices labels Apr 11, 2022
@nicolasstucki
Copy link
Contributor

Indeed, typeMembers is supposed to return all type members. it seems that right now it does the same as declaredTypes. This is a bug.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 26, 2022
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 26, 2022
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2022
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 23, 2022
little-inferno pushed a commit to little-inferno/dotty that referenced this issue Jan 25, 2023
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants