-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
b67
-
generic, x86
-
generic, windows_xp
-
Verified
This program doesn't compile and causes a stack overflow:
import java.util.*;
class Test<T extends Comparable<? super T>> {
abstract class Group<E extends Comparable<? super E>>
extends ArrayList<E>
implements Comparable<Group<? extends E>> {}
abstract class Sequence<E extends Comparable<? super E>>
extends TreeSet<E>
implements Comparable<Sequence<? extends E>> {}
public void containsCombination(SortedSet<Group<T>> groups,
SortedSet<Sequence<T>> sequences) {
foo(groups, sequences);
}
<C extends Collection<T>> void foo(SortedSet<? extends C> setToCheck,
SortedSet<? extends C> validSet) {}
}
###@###.### 2005-05-20 01:26:32 GMT
Stack overflow in 5.0u6:
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type.accept(Type.java:80)
at com.sun.tools.javac.code.Types.lowerBound(Types.java:112)
at com.sun.tools.javac.code.Types$IsSubTypeFcn.visitClassType(Types.java:410)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:482)
at com.sun.tools.javac.code.Types$IsSubTypeFcn.isSubType(Types.java:347)
import java.util.*;
class Test<T extends Comparable<? super T>> {
abstract class Group<E extends Comparable<? super E>>
extends ArrayList<E>
implements Comparable<Group<? extends E>> {}
abstract class Sequence<E extends Comparable<? super E>>
extends TreeSet<E>
implements Comparable<Sequence<? extends E>> {}
public void containsCombination(SortedSet<Group<T>> groups,
SortedSet<Sequence<T>> sequences) {
foo(groups, sequences);
}
<C extends Collection<T>> void foo(SortedSet<? extends C> setToCheck,
SortedSet<? extends C> validSet) {}
}
###@###.### 2005-05-20 01:26:32 GMT
Stack overflow in 5.0u6:
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type.accept(Type.java:80)
at com.sun.tools.javac.code.Types.lowerBound(Types.java:112)
at com.sun.tools.javac.code.Types$IsSubTypeFcn.visitClassType(Types.java:410)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:482)
at com.sun.tools.javac.code.Types$IsSubTypeFcn.isSubType(Types.java:347)
- duplicates
-
JDK-6296502 Compiler crashes with "java.lang.StackOverflowError"
-
- Closed
-