Draft JLS spec for JEP 305: Pattern matching for instanceof
chris.hegarty at oracle.com
Mon Oct 21 14:49:30 UTC 2019
> 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:
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 (22.214.171.124). If ReferenceType is not compatible with ReferenceType then a compile-time error occurs."
If *RelationalExpression* is not compatible with ReferenceType then a compile-time error occurs.
More information about the amber-spec-experts