枚举实现Comparable,因此FooImpl最终使用不兼容的参数将Comparable扩展了两次。
以下将起作用:
public interface Foo<SelfType extends Foo<SelfType>> extends Comparable<SelfType> { ... }public enum FooImpl implements Foo<FooImpl> { ... }
枚举实现Comparable,因此FooImpl最终使用不兼容的参数将Comparable扩展了两次。
以下将起作用:
public interface Foo<SelfType extends Foo<SelfType>> extends Comparable<SelfType> { ... }public enum FooImpl implements Foo<FooImpl> { ... }