On Wed, 28 Jan 2026 18:48:58 GMT, Jan Lahoda <[email protected]> wrote:

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

I'm ok with these comments -- I'm a bit less ok with the ones that say "this 
might be better in this form" -- either we file these case as follow up bugs, 
or we might as well remove the comments, as I don't think a comment in a test 
is the best way to track issues/further improvements

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

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

Reply via email to