RFR: 8322882: Null pointer error when compiling Static initializer in a local class
Archie Cobbs
acobbs at openjdk.org
Wed Jun 19 01:51:14 UTC 2024
On Tue, 18 Jun 2024 23:21:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Of course the analysis should not attempt to reason about captured variables, but instead should try to walk back from the current env to the env of the target local class, and if any static context is crossed during the traversal, an error should be issued.
That sounds like a reasonable rule and if it matches the spec is meaning to say then of course it's correct.
> If you want you can take a stab at implementing this check.
Thanks, that'd be great. I'll be interested to follow along and am happy to close out this PR if/when you come up with a better check.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19754#issuecomment-2177368326
More information about the compiler-dev
mailing list