RFR: 8367530: The exhaustiveness errors could be improved [v16]

Jan Lahoda jlahoda at openjdk.org
Tue Feb 3 14:39:16 UTC 2026


On Tue, 3 Feb 2026 13:55:20 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Updating copyright headers.
>>  - Making the skipping of base checks more clear.
>>  - Reflecting review feedback - cleanup.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java line 656:
> 
>> 654:             }
>> 655:             if (covered) {
>> 656:                 PatternDescription pd = new BindingPattern(rpOne.recordType, -1, Set.of(pattern));
> 
> shouldn't this `-1` be: `NO_BASE_CHECKS_COUNTING`?

The `-1` here was the number of permitted subtypes, so not quite `NO_BASE_CHECKS_COUNTING`. But, looking at it, the component is not needed anymore, so removed. Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2759406854


More information about the compiler-dev mailing list