jdk-24/test/langtools/tools/javac/mandatoryWarnings/deprecated/P.java

13 lines
340 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/* /nodynamiccopyright/ */
// P references Q, which will require Q to be attributed,
// and therefore generate warnings about Q
// In addition, P will generate warnings of its own
// because it overrides deprecated methods in Q.
class P
{
Q q = new Q() {
void foo() { } // warning: override deprecated method
};
};