RFR: 8286797: Guards of constant value false are not permitted
Aggelos Biboudis
abimpoudis at openjdk.java.net
Tue May 17 12:34:19 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`.
-------------
Commit messages:
- 8286797: Guards of constant value false are not permitted
Changes: https://git.openjdk.java.net/jdk/pull/8745/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8745&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8286797
Stats: 106 lines in 9 files changed: 100 ins; 0 del; 6 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