On Fri, 18 Jun 2021 09:47:29 GMT, Rémi Forax <[email protected]> wrote:
>> This is to represent cases like:
>>
>> E sel = null;
>> switch (sel) {
>> case A -> {}
>> case E e && "B".equals(e.name()) -> {}
>> case C -> {}
>> case E e -> {}
>> }
>>
>>
>> The method needs to know which cases represent constants and which represent
>> patterns (even though the primary type of all the patterns will be the enum
>> type), so we cannot easily put the `Class` first (or elide it), and then a
>> `String...`, unless we represent the patterns in the `String...` array
>> somehow.
>
> Ok got it,
> At some point, we will have to represent patterns either as String and parse
> them or as Condy of condy if we want a more structured recursive way.
Of course - I missed it! Thanks for the explanation.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/81