This is a compile-time error if the type variable in the class type the parameter section depends on itself.
The parameter cannot be obtained by itself.
For example, this is not legal:
class YourClass<S extends S> { }
But you probably wonβt use it as it makes no sense.
You can do this, for example:
class YourClass<T extends S, S extends T> { }
And it will not compile, because T
depends on S
, which depends on itself (cycle)
source share