Integrated: 8259025: Record compact constructor using Objects.requireNonNull

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Mon Jan 11 13:53:59 UTC 2021


On Sat, 2 Jan 2021 12:32:05 GMT, Guoxiong Li <github.com+13688759+lgxbslgx at openjdk.org> wrote:

> Hi all,
> 
> Currently, the method `Attr::lambdaEnv` doesn't set the `lambdaEnv.info.isLambda` to `true` and lets the caller set it. But not all the callers remember to set it. In this bug, `DefferredAttr::attribSpeculativeLambda` uses `Attr::lambdaEnv` and doesn't set `lambdaEnv.info.isLambda` to `true`. So when `Attr::visitReturn` uses `!env.info.isLambda` to judge if it is in the lambda environment, it gets the wrong information and generates an error message.
> 
> This patch moves `lambdaEnv.info.isLambda = true;` into `Attr::lambdaEnv` to solve the problem and adds a corresponding test case. Thank you for taking the time to review.
> 
> Best Regards.

This pull request has now been integrated.

Changeset: 33fbc10c
Author:    Guoxiong Li <lgxbslgx at gmail.com>
Committer: Attila Szegedi <attila at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/33fbc10c
Stats:     14 lines in 2 files changed: 11 ins; 1 del; 2 mod

8259025: Record compact constructor using Objects.requireNonNull

Reviewed-by: attila

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

PR: https://git.openjdk.java.net/jdk/pull/1917


More information about the compiler-dev mailing list