Fri, 29 Apr 2011 16:06:28 +0100
6550655: com.sun.tools.javac.code.Symbol$CompletionFailure
Summary: Accessing a non-existing enum constant from an annotation whose class is available results in an internal error
Reviewed-by: jjg
aoqi@0 | 1 | /* /nodynamiccopyright/ */ |
aoqi@0 | 2 | // Q has overrides a deprecated method, |
aoqi@0 | 3 | // which will generate a warning when Q is entered |
aoqi@0 | 4 | class Q extends Q2 |
aoqi@0 | 5 | { |
aoqi@0 | 6 | @Deprecated void foo() { } |
aoqi@0 | 7 | void bar() { } // warning: override deprecated method |
aoqi@0 | 8 | } |
aoqi@0 | 9 | |
aoqi@0 | 10 | class Q2 { |
aoqi@0 | 11 | @Deprecated void bar() { } |
aoqi@0 | 12 | } |
aoqi@0 | 13 | |
aoqi@0 | 14 | // Q3 is not required in order to compile Q or Q2, |
aoqi@0 | 15 | // and will therefore be attributed later |
aoqi@0 | 16 | class Q3 { |
aoqi@0 | 17 | void baz() { new Q().foo(); } // warning: call deprecated method |
aoqi@0 | 18 | } |