RFR: 8320948: NPE due to unreported compiler error

Vicente Romero vromero at openjdk.org
Fri Dec 1 15:02:38 UTC 2023

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



Commit messages:
 - removing import
 - 8320948: NPE due to unreported compiler error

Changes: https://git.openjdk.org/jdk/pull/16923/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16923&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8320948
  Stats: 35 lines in 3 files changed: 34 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16923.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16923/head:pull/16923

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

More information about the compiler-dev mailing list