Switch expressions spec

Alex Buckley alex.buckley at oracle.com
Mon Mar 4 23:20:01 UTC 2019

For clarity, we have renamed the January 2019 version from:




The CSR for switch expressions (JDK-8207241) has the spec as an 
attachment, but also links to an online version for reader convenience. 
Originally it linked to `switch-expressions.html`, but that is a living 
document and hence unsuitable for a CSR, so now it links to 


On 2/27/2019 4:43 AM, Gavin Bierman wrote:
> I have uploaded a revised switch expressions spec at:
> http://cr.openjdk.java.net/~gbierman/switch-expressions.html
> This is functionally equivalent to the spec uploaded last month. The change is in how we specify the type checking of switch expressions. We have make simplifications to make it more consistent with the specification of conditional expressions. The behaviour of type checking is unchanged.
> Thanks,
> Gavin
> PS: I have left the January version at http://cr.openjdk.java.net/~gbierman/switch-expressions-old.html for reference.
>> On 17 Jan 2019, at 10:14, Gavin Bierman <gavin.bierman at oracle.com> wrote:
>> Thank you Alex and Tagir. I have uploaded a new version of the spec at:
>> http://cr.openjdk.java.net/~gbierman/switch-expressions.html
>> This contains all the changes you suggested below. In addition, there is a small bug fix in 5.6.3 concerning widening (https://bugs.openjdk.java.net/browse/JDK-8213180). I have also taken the opportunity to reorder chapter 15 slightly, so switch expressions are now section 15.28 and constant expressions are now section 15.29 (the last section in the chapter).
>> Comments welcome!
>> Gavin

More information about the amber-spec-observers mailing list