jdk-24/test/langtools/tools/javac/limits/ArrayDims4.java

39 lines
1.0 KiB
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4309152
* @summary Compiler silently generates bytecode that exceeds VM limits
* @author gafter
*
* @compile/fail/ref=ArrayDims4.out -XDrawDiagnostics ArrayDims4.java
2007-12-01 00:00:00 +00:00
*/
class ArrayDims4 {
static Object y = new Object
[1][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][]; // 256 = too many
}