RFR: 8320948: NPE due to unreported compiler error

Jan Lahoda jlahoda at openjdk.org
Wed Dec 6 16:33:36 UTC 2023


On Fri, 1 Dec 2023 14:51:15 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> The compiler is using some heuristics to decide whether or not to report a compiler error while doing recovery on deferred types. For the erroneous code included in the test case, the current heuristics decide not to report the error so ASTs with null types manage to get up to the code generation phase. This fix's proposal is to look into the speculative types of a deferred type and if all the speculative types are erroneous, then use a recovery type as the target type, which later on in the pipeline will imply reporting errors if any
> 
> TIA

Looks reasonable to me.

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

Marked as reviewed by jlahoda (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16923#pullrequestreview-1768065065


More information about the compiler-dev mailing list