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

Aggelos Biboudis abimpoudis at openjdk.java.net
Thu May 19 08:26:44 UTC 2022


> Simple fix that addresses this line from the spec:
> 
>> It is a compile-time error if a when expression is a constant expression ([15.29](https://docs.oracle.com/javase/specs/jls/se18/html/jls-15.html#jls-15.29)) with the value false.
> 
> Extracts one small utility method `isBooleanWithValue` in `TreeInfo`.

Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:

  8286797: Adjust error message

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8745/files
  - new: https://git.openjdk.java.net/jdk/pull/8745/files/8814f4fb..2983b9ab

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8745&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8745&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8745.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8745/head:pull/8745

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


More information about the compiler-dev mailing list