void () { doTest(""" void test(Object x) { switch (x) { record Record(String a) { } case Record(<selection>var a</selection>) -> { System.out.println(a); } default -> { System.out.println(x); } } }""", "String", "String"); }