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

Jan Lahoda jlahoda at openjdk.org
Wed Jan 28 18:52:11 UTC 2026


On Wed, 28 Jan 2026 17:54:57 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.
>
> test/langtools/tools/javac/patterns/ExhaustivenessConvenientErrors.java line 333:
> 
>> 331:                            case Root(R2 _, R2(R1 _, R2 _), R2(R1 _, R1 _)) -> 0;
>> 332:                            case Root(R2 _, R2(R1 _, R2 _), R2(R1 _, R2 _)) -> 0;
>> 333: //                           case Root(R2 _, R2(R1 _, R2 _), R2(R2 _, R1 _)) -> 0;
> 
> it could be confusing to have commented code in a test, I guess probably to just remove the commented code?

These commented-out cases are the ones that are missing from the switch to be exhaustive. I kept them there intentionally, so see what the user might have missed, so that it can be compared with what javac reports. I can add comments to them if desired.

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

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


More information about the build-dev mailing list