On Thu, 22 Oct 2020 12:14:42 GMT, Jan Lahoda <jlah...@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. > > Jan Lahoda has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains 18 additional commits since > the last revision: > > - Removing the preview deprecated methods from BindingPatternTree. > - Merge branch 'master' into patterns-instanceof3 > - Fixing review comments. > - Cleanup: using a null instead of List.of() as a parameter to > JavaCompiler.getTask > - Merge branch 'master' into patterns-instanceof3 > - Fixing more tests. > - Correcting positions. > - Improve the AST model. > - Merge branch 'master' into patterns-instanceof3 > - Updating @since tags. > - ... and 8 more: > https://git.openjdk.java.net/jdk/compare/68eec7af...77468e24 looks good! ------------- Marked as reviewed by vromero (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/559