void () { myFixture.configureByText("Test.java", """ import java.io.Serializable; import java.util.List; import java.util.function.Supplier; record Box<T extends CharSequence>(T get) implements Supplier<T>, Serializable {} class ClassTest { void test(List<? extends Supplier<String>> s) { if (s.get(0) instanceof Box(var x)) { System.out.println(x.trim()); } } } """); myFixture.checkHighlighting(); }