[moved to amber-spec] ----- Mail original ----- > De: "jan lahoda" <jan.lah...@oracle.com> > À: "amber-dev" <amber-...@openjdk.java.net> > Envoyé: Jeudi 6 Février 2020 21:18:52 > Objet: Pattern Matching for instanceof (Preview 2)
> Hi, > > Thanks to Gavin, Brian and Alex, there is a new draft JEP for Pattern > Matching for instanceof (Preview 2): > https://bugs.openjdk.java.net/browse/JDK-8235186 > > Any feedback on the JEP is more than welcome! > > Thanks, > Jan so the difference with the previous preview is that deconstruction is added. I see two questions: - the grammar allows to mix var and non-var for a given reference type, i think that should only permitted if the non var is a deconstruction itself ? - must the identifier of a pattern argument be the same name as the corresponding record component ? To be coherent with the fact that constructors requires the same names. cheers, Rémi