void () { myFixture.configureByText("Test.java", """ class Test { interface A<X, Y, Z> {} record Pair<T,T1>(T first, T1 second) implements A<T, T1, Object> {} void test(A<? extends A<? extends Number, String, Object>, ? extends A<String, ? extends Number, Object>, Object> a) { if (a instanceof Pair(Pair(var v1, var v2), Pair(var v3, var v4))) { System.out.println(v1.intValue()); System.out.println(v2.length()); System.out.println(v3.length()); System.out.println(v4.intValue()); } } } """); myFixture.checkHighlighting(); }