Weird 'Inner referenced via subclass' inspection violation


Take these two mixed language class definitions:

class KotlinClass {
    interface InnerInterface {

public class JavaClass implements KotlinClass.InnerInterface {

implements KotlinClass.InnerInterface will trigger this violation in IntelliJ:

Inner class ‘InnerInterface’ declared in class ‘KotlinClass’ but referenced via subclass ‘KotlinClass’

I understand the inspection. But if the inspection works correctly, then this must mean that there is a class KotlinClass which derives from KotlinClass. Which is weird.

Can anyone shed light on this? To reproduce the violation, enable ‘Inner class referenced via subclass’ inspection in IntelliJ.