Integrated: 8333169: javac NullPointerException record.type
Jan Lahoda
jlahoda at openjdk.org
Fri May 31 13:17:06 UTC 2024
On Fri, 31 May 2024 10:32:20 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> While attributing cases, `Attr` computes `completesNormally`, by invoking `Flow`. It will do `preFlow` before running the `Flow`, to make fill in missing types/symbols in the AST, as `Flow` generally requires them. But, the visitor filling the types is missing code to fill in the missing type for record patterns, and consequently `Flow` may crash on record pattern while computing `completesNormally`.
>
> The proposal herein is to adjust the visitor to fill in the missing attributes for record patterns, as is done for other AST nodes.
>
> I've also filled a follow-up to reconsider computing `completesNormally` in `Attr`, to get more performance. This will require moving some of the checks that are currently done in `Attr` to `Flow`, but it would probably pay off:
> https://bugs.openjdk.org/browse/JDK-8333333
This pull request has now been integrated.
Changeset: 32ee252c
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/32ee252c455d3ddcb5954698b546ac39a40515e8
Stats: 43 lines in 2 files changed: 42 ins; 0 del; 1 mod
8333169: javac NullPointerException record.type
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/19498
More information about the compiler-dev
mailing list