test/tools/javac/T6245591.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/T6245591.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,19 @@
     1.4 +/*
     1.5 + * @test  /nodynamiccopyright/
     1.6 + * @bug 6245591
     1.7 + * @compile/ref=T6245591.out -XDrawDiagnostics -Xlint:all,-path T6245591.java
     1.8 + */
     1.9 +enum Season {
    1.10 +    /** @deprecated */
    1.11 +    WINTER, SPRING, SUMMER, FALL;
    1.12 +}
    1.13 +enum Season1 {
    1.14 +    WINTER, SPRING, SUMMER, FALL;
    1.15 +}
    1.16 +class T6245591 {
    1.17 +    void m() {
    1.18 +        Season s1 = Season.WINTER;    // ref to WINTER should be deprecated
    1.19 +        Season1 s2 = Season1.WINTER;  // nothing here should be deprecated;
    1.20 +                                      // @deprecated should not leak out of Season
    1.21 +    }
    1.22 +}

mercurial