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

Vicente Romero vromero at openjdk.org
Tue Feb 3 15:23:41 UTC 2026


On Tue, 3 Feb 2026 14:35:44 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> 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!

oh I see, thanks!

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

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


More information about the compiler-dev mailing list