Jan Lahoda 670eff1ee6 6707032: Division by zero warning not suppressed properly in some cases
Delay reporting of the division by zero warning until annotations are resolved, so that @SuppressWarnings works correctly.

Reviewed-by: vromero
2014-06-30 17:08:06 +02:00

19 lines
517 B
Java

/**
* @test /nodynamiccopyright/
* @bug 6707032
* @summary Verify that \\@SuppressWarnings("divzero") works for constant initializers
* @build VerifySuppressWarnings
* @compile/ref=T6707032.out -XDrawDiagnostics -Xlint:divzero T6707032.java
* @run main VerifySuppressWarnings T6707032.java
*/
public class T6707032 {
public static final int D1 = T6707032b.D0;
public static final int D2 = 1/0;
}
class T6707032b {
public static final int D0 = 1/0;
public static final int D3 = T6707032.D2;
}