I have three types, A
, B
, and C
, which are defined as follows:
public sealed interface A extends Comparable<A> permits B<?>, C { ...
public non-sealed interface B<T> extends A { ...
public record C(String s, int i) implements A { ...
Everything compiles and works fine in Eclipse. Now when I run a gradle build, I get an error error: '{' expected
at the place of the opening bracket at permits B<?>
. When I remove <?>
, so that the type definition is as follows (raw type):
public sealed interface A extends Comparable<A> permits B, C { ...
...then gradle doesn't complain and the build is successful. Is this a gradle bug or is the type definition I am using not allowed?