Fri, 28 Jan 2011 12:01:07 +0000
6910550: javac 1.5.0_17 fails with incorrect error message
Summary: multiple clashing members declared in same class should be added to the class' scope in order to avoid downstream spurious diagnostics
Reviewed-by: jjg
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6734819
4 * @summary Javac performs flows analysis on already translated classes
5 * @author Maurizio Cimadamore
6 *
7 * @compile/fail/ref=T6734819c.out -XDrawDiagnostics -Xlint:all -XDverboseCompilePolicy T6734819c.java
8 */
9 class Y extends W {}
10 class W extends Z {}
12 class Z {
13 void m(Z z) {
14 return;
15 W w = (W)z;
16 }
17 }