void () { configureByText(JavaFileType.INSTANCE, """ package x;\s class ClassA { static <T> void sayHello(Class<? extends T> msg) {} } class ClassB extends ClassA { static <T extends String> void sayHello(Class<? extends T> msg) {<caret> } } """); assertOneElement(highlightErrors()); type("//my comment inside method body, so class modifier won't be visited"); assertOneElement(highlightErrors()); }