Other |
---|
5.0Resolved |
Duplicate :
|
The new subst scheme breaks an idiom used in java.lang.ref. An isolated test case follows. This is perfectly typesafe, yet rejected, with enqueue(? extends Ref<? extends java.lang.Object>) in Q<? super T> cannot be applied to (Ref<T>) this.queue.enqueue(this); ^ class Q<T> { void enqueue(Ref<? extends T> r) { } } class Ref<T> { Q<? super T> queue; void enqueue() { this.queue.enqueue(this); } }
|