FULL PRODUCT VERSION :
Reproduced on all recent versions. Tested most recently on 1.6.0_18
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
A DESCRIPTION OF THE PROBLEM :
// Compiling the following causes a javac crash.
interface I<T> {}
interface A<T> extends I<A<A<T>>>{}
abstract class X {
abstract <T> T foo(T x, T y);
void bar(A<Integer> x, A<String> y){
foo(x, y);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile the program appearing in the description
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiler produces an intelligible diagnostic about problematic inheritance hierarchy
ACTUAL -
javac consumes huge amounts of processing time and memory and finally crashes.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface I<T> {}
interface A<T> extends I<A<A<T>>>{}
abstract class X {
abstract <T> T foo(T x, T y);
void bar(A<Integer> x, A<String> y){
foo(x, y);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Write a program that doesn't crash javac.
Reproduced on all recent versions. Tested most recently on 1.6.0_18
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
A DESCRIPTION OF THE PROBLEM :
// Compiling the following causes a javac crash.
interface I<T> {}
interface A<T> extends I<A<A<T>>>{}
abstract class X {
abstract <T> T foo(T x, T y);
void bar(A<Integer> x, A<String> y){
foo(x, y);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile the program appearing in the description
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiler produces an intelligible diagnostic about problematic inheritance hierarchy
ACTUAL -
javac consumes huge amounts of processing time and memory and finally crashes.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface I<T> {}
interface A<T> extends I<A<A<T>>>{}
abstract class X {
abstract <T> T foo(T x, T y);
void bar(A<Integer> x, A<String> y){
foo(x, y);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Write a program that doesn't crash javac.
- duplicates
-
JDK-7015715 lub gets stuck on type with complex supertype
- Closed