RFR: 8286797: Guards of constant value false are not permitted [v2]

Aggelos Biboudis abimpoudis at openjdk.java.net
Wed May 18 07:19:09 UTC 2022


On Tue, 17 May 2022 20:13:25 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Aggelos Biboudis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   8286797: Guards of constant value false are not permitted
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties line 516:
> 
>> 514: 
>> 515: compiler.err.guard.has.constant.expression.false=\
>> 516:     this case label has a when constant expression that is false
> 
> `when` here should be: `''when''`, but shouldn't the message probably start with:
>     this case label has a guard...?

True. I improved the error message a bit.

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

PR: https://git.openjdk.java.net/jdk/pull/8745


More information about the compiler-dev mailing list