8193142: Regression: ClassCastException: Type$ErrorType cannot be cast to Type$ArrayType
Reviewed-by: mcimadamore
This commit is contained in:
parent
2f125c1bd5
commit
ac4e5933a6
@ -4238,9 +4238,6 @@ public class Attr extends JCTree.Visitor {
|
||||
public void visitTypeArray(JCArrayTypeTree tree) {
|
||||
Type etype = attribType(tree.elemtype, env);
|
||||
Type type = new ArrayType(etype, syms.arrayClass);
|
||||
if (etype.isErroneous()) {
|
||||
type = types.createErrorType(type);
|
||||
}
|
||||
result = check(tree, type, KindSelector.TYP, resultInfo);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8193142
|
||||
* @summary Regression: ClassCastException: Type$ErrorType cannot be cast to Type$ArrayType
|
||||
* @compile/fail/ref=ElementTypeMissingTest.out -XDrawDiagnostics -XDdev ElementTypeMissingTest.java
|
||||
*/
|
||||
|
||||
public class ElementTypeMissingTest { void m(Unkn... own) { } }
|
@ -0,0 +1,2 @@
|
||||
ElementTypeMissingTest.java:8:46: compiler.err.cant.resolve.location: kindname.class, Unkn, , , (compiler.misc.location: kindname.class, ElementTypeMissingTest, null)
|
||||
1 error
|
Loading…
Reference in New Issue
Block a user