jdk-24/test/langtools/tools/javac/UncaughtOverflow.java

15 lines
332 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
* @bug 4035346 4097402
2007-12-01 00:00:00 +00:00
* @summary Compiler used to allow this initialization, despite the overflow.
* @author turnidge
*
* @compile/fail/ref=UncaughtOverflow.out -XDrawDiagnostics UncaughtOverflow.java
2007-12-01 00:00:00 +00:00
*/
public
class UncaughtOverflow {
int i1 = 100000000000;
int i2 = -2147483649;
2007-12-01 00:00:00 +00:00
}