Integrated: 8295447: NullPointerException with invalid pattern matching construct in constructor call
Aggelos Biboudis
abimpoudis at openjdk.org
Sat Nov 26 15:57:15 UTC 2022
On Thu, 20 Oct 2022 11:30:41 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> In the examples below:
>
>
> int i = (o instanceof Bar(int x))? 0 : 1;
> meth(i);
>
>
>
> meth((o instanceof Bar(int x))? 0 : 1);
>
>
> the error `DeconstructionPatternOnlyRecords` was reported only on the first case but the compiler was still crashing in both occasions. `NoType` was passed and `checkCastablePattern` was letting an erroneous type to pass through the subtyping checks. The proposed fix addresses that in `checkCastablePattern`.
This pull request has now been integrated.
Changeset: 6c05771b
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
Committer: Vicente Romero <vromero at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6c05771b9be3dd5cbcdb40d2e53cc53959926cdd
Stats: 57 lines in 3 files changed: 56 ins; 0 del; 1 mod
8295447: NullPointerException with invalid pattern matching construct in constructor call
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/10791
More information about the compiler-dev
mailing list