RFR: 8262891: Compiler implementation for Pattern Matching for switch (Preview) [v12]

Jan Lahoda jlahoda at openjdk.java.net
Fri Jun 4 20:20:28 UTC 2021


On Fri, 4 Jun 2021 15:46:32 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixing typo.
>
> test/langtools/tools/javac/patterns/DisambiguateParenthesizedPattern.java line 72:
> 
>> 70:         SwitchTree st = (SwitchTree) method.getBody().getStatements().get(0);
>> 71:         CaseLabelTree label = st.getCases().get(0).getLabels().get(0);
>> 72:         ExpressionType actualType = switch (label) {
> 
> Should the test be careful of using a pattern match switch?

I don't think using the new feature in the tests is problematic (esp. javac tests related to the feature). It helps to ensure the feature really works on real code.

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

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



More information about the build-dev mailing list