Effectively final local variable cannot be declared as final
Archie Cobbs
archie.cobbs at gmail.com
Tue Oct 25 15:43:03 UTC 2022
On Tue, Sep 27, 2022 at 4:25 PM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> I believe this is a bug in how the compiler determines effective
> finality. Javac does this while computing DA/DU. This is because locals
> that are assigned "at most once" are considered effectively final (as
> per the JLS).
>
FYI,
I just posted a PR that should fix this... any comments or suggestions
appreciated.
https://github.com/openjdk/jdk/pull/10856
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20221025/4efdd65c/attachment-0001.htm>
More information about the compiler-dev
mailing list