void () { myFixture.configureByText("a.java", """ class X { final class StrIncompatible {} record MyRecord(CharSequence comp) {} void test(Object o) { int StrVar = 1; if (o instanceof MyRecord(Str<caret> s)) } }"""); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "StrIncompatible", "String", "StrictMath", "StringBuffer", "StringBuilder"); }