-
Bug
-
Resolution: Not an Issue
-
P4
-
9
javac accepts the following code:
import java.util.*;
interface Foo {}
interface Bar<T extends Foo> extends Comparable<Bar<?>> {
Comparator<Bar<? extends Foo>> DATE_TIME_ORDER = null;
Comparator<Bar<?>> date = DATE_TIME_ORDER; // this shouldn't be accepted
}
accepting this code implies that '?' is equal to '? extends Foo'
import java.util.*;
interface Foo {}
interface Bar<T extends Foo> extends Comparable<Bar<?>> {
Comparator<Bar<? extends Foo>> DATE_TIME_ORDER = null;
Comparator<Bar<?>> date = DATE_TIME_ORDER; // this shouldn't be accepted
}
accepting this code implies that '?' is equal to '? extends Foo'