Integrated: 8250625: Compiler implementation of Pattern Matching for instanceof (Final)
jlahoda at openjdk.java.net
Thu Nov 5 08:04:55 UTC 2020
On Thu, 8 Oct 2020 11:49:17 GMT, Jan Lahoda <jlahoda at openjdk.org> 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.
Author: Jan Lahoda <jlahoda at openjdk.org>
Stats: 651 lines in 90 files changed: 228 ins; 310 del; 113 mod
8250625: Compiler implementation of Pattern Matching for instanceof (Final)
More information about the compiler-dev