Withdrawn: 8043179: Lambda expression can mutate final field

duke duke at openjdk.org
Fri Dec 16 00:03:09 UTC 2022

On Wed, 21 Sep 2022 23:03:45 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:

> (Description revised)
> JDK-8043176 updated the JLS 16.1.10 to describe how within a lambda body, any variables that were DU before the lambda expression must not be considered DU at the start of the lambda block, because arbitrary code could have executed in the meantime:
>>  _No rule allows V to be definitely unassigned before a lambda body. This is by design: a variable that was definitely unassigned before the lambda body may end up being assigned to later on, so we cannot conclude that the variable will be unassigned when the body is executed._
> This fix to `Flow.AssignAnalyzer` follows in a straightforward way: mark all variables as not DU before recursing into the lambda body.

This pull request has been closed without being integrated.


PR: https://git.openjdk.org/jdk/pull/10381

More information about the compiler-dev mailing list