670eff1ee6
Delay reporting of the division by zero warning until annotations are resolved, so that @SuppressWarnings works correctly. Reviewed-by: vromero
19 lines
517 B
Java
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;
|
|
}
|