This program causes a stack overflow in javac.
final class Wrapper<T extends Comparable<? extends T>> {
private final T theObject;
public Wrapper(T t) { theObject = t; }
public <U extends T> Wrapper(Wrapper<U> w) { theObject = w.theObject;}
public T getWrapper() { return theObject; }
}
final class Wrapper<T extends Comparable<? extends T>> {
private final T theObject;
public Wrapper(T t) { theObject = t; }
public <U extends T> Wrapper(Wrapper<U> w) { theObject = w.theObject;}
public T getWrapper() { return theObject; }
}
- duplicates
-
JDK-5097548 (crash) Stack overflow in capture conversion
- Resolved