On Thu, 8 Oct 2020 11:49:17 GMT, Jan Lahoda <[email protected]> wrote:

> This is the current proposed patch for the upcoming JEP 394, for pattern 
> matching for instanceof.
> 
> A summary of changes:
> -making the feature permanent (non-preview)
> -making the binding variables non-final (as per current specification 
> proposal)
> -producing a compile-time error for the case where the expression's type is a 
> subtype of the type test pattern's type (as per current specification 
> proposal)
> -changing the AST structure so that the binding variable has a VariableTree 
> in the AST. BindingPatternTree is preserved and encloses the VariableTree. 
> The reason is better consistency in the API, with nodes like CatchTree, 
> EnhancedForLoop Tree, etc.
> 
> This change will not be integrated until JEP 394 is targetted.

This pull request has now been integrated.

Changeset: 18bc95ba
Author:    Jan Lahoda <[email protected]>
URL:       https://git.openjdk.java.net/jdk/commit/18bc95ba
Stats:     651 lines in 90 files changed: 228 ins; 310 del; 113 mod

8250625: Compiler implementation of Pattern Matching for instanceof (Final)

Reviewed-by: vromero

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

PR: https://git.openjdk.java.net/jdk/pull/559

Reply via email to