RFR: 8250625: Compiler implementation of Pattern Matching for instanceof (Final) [v3]
Jan Lahoda
jlahoda at openjdk.java.net
Wed Oct 21 12:29:38 UTC 2020
> 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.
Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
Fixing review comments.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/559/files
- new: https://git.openjdk.java.net/jdk/pull/559/files/5978bca0..5699194b
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=559&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=559&range=01-02
Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/559.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/559/head:pull/559
PR: https://git.openjdk.java.net/jdk/pull/559
More information about the compiler-dev
mailing list