Last change
on this file was 2, checked in by dmik, 15 years ago |
Imported OpenJDK 6 b19 sources from Oracle.
|
File size:
668 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * @test /nodynamiccopyright/
|
---|
3 | * @bug 6241723
|
---|
4 | * @summary compiler can miss some references to at-Deprecated classes
|
---|
5 | * @compile/fail/ref=T6241723.out -XDstdout -XDrawDiagnostics -Xlint:deprecation -Werror T6241723.java
|
---|
6 | */
|
---|
7 |
|
---|
8 | @Deprecated class A1
|
---|
9 | {
|
---|
10 | }
|
---|
11 |
|
---|
12 | class A2
|
---|
13 | {
|
---|
14 | @Deprecated
|
---|
15 | static class A21 { }
|
---|
16 | }
|
---|
17 |
|
---|
18 |
|
---|
19 | public class T6241723 {
|
---|
20 | // references to earlier classes
|
---|
21 | A1 a1; // warning
|
---|
22 | A2 a2; // OK
|
---|
23 | A2.A21 a21; // warning
|
---|
24 |
|
---|
25 | // forward references to classes not yet seen
|
---|
26 | Z1 z1; // warning
|
---|
27 | Z2 z2; // OK
|
---|
28 | Z2.Z21 z21; // warning
|
---|
29 | }
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | @Deprecated class Z1
|
---|
34 | {
|
---|
35 | }
|
---|
36 |
|
---|
37 | class Z2
|
---|
38 | {
|
---|
39 | @Deprecated
|
---|
40 | static class Z21 { }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.