提交 4bcb2d83 编写于 作者: J jlahoda

8022508: javac crashes if the generics arity of a base class is wrong

Reviewed-by: mcimadamore, vromero
上级 16891a92
......@@ -1747,7 +1747,7 @@ public class Check {
if (!sup.hasTag(CLASS)) return;
for (Type t1 = sup;
t1.tsym.type.isParameterized();
t1.hasTag(CLASS) && t1.tsym.type.isParameterized();
t1 = types.supertype(t1)) {
for (Scope.Entry e1 = t1.tsym.members().elems;
e1 != null;
......
/*
* @test /nodynamiccopyright/
* @bug 8016640
* @bug 8016640 8022508
* @summary compiler hangs if the generics arity of a base class is wrong
* @compile/fail/ref=T8016640.out -XDrawDiagnostics T8016640.java
*/
class T8016640 {
static class Foo<X,Y> { }
static class BadFoo<T> extends Foo<T> { }
static class SubBadFoo<T> extends BadFoo<T> { }
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册