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

GROOVY-8283: field hides getter of super class (not interface) #1767

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eric-milles
Copy link
Member

@eric-milles eric-milles commented Aug 19, 2022

For the dynamic side of 8283, field can be selected in MetaClassImpl. If access method is declared by an interface, the interface method is the one indexed so must be considered pervasive in the type hierarchy (cannot be safely hidden). Not sure if this kind of name hiding should be extended to inner classes; hopefully the commit is enough of a first step to determine if this protocol should be changed or left alone.

@blackdrag @paulk-asert

TODO:

  • setter method
  • STC selection of field vs method (verify what StaticTypeCheckingVisitor does vs MetaClassImpl)
  • static compiler classgen -- I think it currently selects the method

https://issues.apache.org/jira/browse/GROOVY-8283

@eric-milles
Copy link
Member Author

c880517 might be good to go in on its own. There is some confusion between sender and theClass because MetaClassImpl uses theClass for sender in the get and set variants that accept only receiver and name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant