Draft JLS spec for JEP 305: Pattern matching for instanceof

Gavin Bierman gavin.bierman at oracle.com
Tue Oct 22 13:34:15 UTC 2019


> On 21 Oct 2019, at 15:49, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> 
> 
> 
>> On 21 Oct 2019, at 10:50, Gavin Bierman <gavin.bierman at oracle.com> wrote:
>> 
>> A second, and hopefully final, draft language spec for JEP 305 (Pattern matching for instanceof) is available at:
>> 
>> http://cr.openjdk.java.net/~gbierman/jep305/jep305-20191021/specs/patterns-instanceof-jls.html
> 
> While proofreading, I came across a minor issue in 15.20.2:
> 
> 	"• The expression RelationalExpression is compatible with the type ReferenceType if (i) RelationalExpression can be converted to type ReferenceType by casting conversion (5.5), and (ii) the casting conversion does not make use of a narrowing reference conversion which is unchecked (5.1.6.2). If ReferenceType is not compatible with ReferenceType then a compile-time error occurs."
> 
> Should be:
>    If *RelationalExpression* is not compatible with ReferenceType then a compile-time error occurs.

Thanks. Will fix.

Gavin


More information about the amber-spec-experts mailing list