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

Aggelos Biboudis abimpoudis at openjdk.java.net
Wed May 18 07:19:06 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 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

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

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

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

  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