RFR: 8338981: Access to private classes should be permitted inside the permits clause of the enclosing top-level class [v14]
Evemose
duke at openjdk.org
Sat Oct 12 14:24:29 UTC 2024
On Thu, 10 Oct 2024 15:05:11 GMT, Vicente Romero <vromero at openjdk.org> wrote:
> > I am sorry for not fully realizing this sooner, I forgot about it. But, the JLS older than 19 didn't have this provision for the nested private classes, I believe. Do we need to limit this to only `-source 19+`?
>
> good catch, yes I agree. @Evemose I think that we will need to add a new feature, to `com.sun.tools.javac.code.Source.Feature`. This PR is a recent-ish example: `https://github.com/openjdk/jdk/pull/12893`
I have added feature, but would apreciate any advice on how to improve error reporting. You could see currecnt behaviour in added test, but I feel like it could be improved, specifically position reporting and erroneous symbol reporting, but I am not really sure how its done properly
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20718#issuecomment-2408581446
More information about the compiler-dev
mailing list