I am confused about why this is an error: ```inter...
# getting-started
q
I am confused about why this is an error:
Copy code
interface A : A.B {
    interface B {
    }
}
The error is "There's a cycle in the inheritance hierarchy for this type", however, this doesn't make sense because a nested interface's type isn't dependent on the outer interface's type at all. Can anyone provide some insight? Additionally, why would the above be disallowed when the following is allowed?
Copy code
interface A : Iterable<A.B> {
    interface B {
    }
}
c
In the second case, it's because generics are erased, so
A.B
has no impact on
A
. No idea why the first one is forbidden, though.
s
maybe it's a rough edge of Kotlin's type system 🤷‍♂️
c
It may be worth reporting as a bug
e
I believe this isn't representable in Java either