1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/P.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,12 @@ 1.4 +/* /nodynamiccopyright/ */ 1.5 +// P references Q, which will require Q to be attributed, 1.6 +// and therefore generate warnings about Q 1.7 +// In addition, P will generate warnings of its own 1.8 +// because it overrides deprecated methods in Q. 1.9 + 1.10 +class P 1.11 +{ 1.12 + Q q = new Q() { 1.13 + void foo() { } // warning: override deprecated method 1.14 + }; 1.15 +};