RFR: 8338981: Access to private classes should be permitted inside the permits clause of the enclosing top-level class [v2]

Evemose duke at openjdk.org
Tue Aug 27 10:13:03 UTC 2024


On Tue, 27 Aug 2024 09:16:32 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Others may have a different opinion, but this seems a bit too hacky to me (given we would need to maintain this for a long time).
> 
> I would suggest to try to add a new flag into `AttrContext`, along the lines of `permitPrivateAccessInHeader`, and set it while attributing the permitted types. Not sure how invasive that'd be, but hopefully not terribly much. And it should be clear (and documented) what's happening.

Honestly, I agree with you, I just didnt know how much invasive changes to existing code could be. I will look into AttrContext later today

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20718#issuecomment-2312111017


More information about the compiler-dev mailing list