import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.Set;
import java.util.TreeSet;
public class Test<K extends Enum<K>, A extends Annotation> {
public static <K extends Enum<K>, A extends Annotation> Set<String> foo(Test<K, A> test, Class<?> cl){
Set<String> result = new TreeSet<>();
for (Field field : cl.getFields()) {
result.addAll(foo(test, field.getType()));
}
return result;
}
}
Produce error
Error:(13, 30) java: [type.argument.type.incompatible] incompatible types in type argument.
found : Enum<K extends Enum>
required: Enum<Enum<K extends Enum>>
Produce error Error:(13, 30) java: [type.argument.type.incompatible] incompatible types in type argument. found : Enum<K extends Enum>
required: Enum<Enum<K extends Enum>>
CF 2.1.0