Re: Pattern matching, not informative error message when the binding name is missing

2021-06-07 Thread Jan Lahoda
Hi Remi, Thanks. I've filled: https://bugs.openjdk.java.net/browse/JDK-8268320 FWIW, I think compiler-dev is a better place for reports like this. Jan On 07. 06. 21 11:03, Remi Forax wrote: Hi all, with this code sealed interface Vehicle {} record Car(String owner, String color) im

Pattern matching, not informative error message when the binding name is missing

2021-06-07 Thread Remi Forax
Hi all, with this code sealed interface Vehicle {} record Car(String owner, String color) implements Vehicle {} record Bus(String owner) implements Vehicle {} public static void example3() { var vehicles = List.of( new Car("Bob", "red"), new Bus("Ana") ); var t