Priya Lakshmi Muthuswamy 9797f94e75 8068836: Error message should be updated when Override is used with static methods
Issue a more direct, specific error when @Override annotation is used with a static method

Reviewed-by: sadayapalam
2017-07-03 12:58:30 +05:30

20 lines
384 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6359949 8068836
* @summary (at)Override of static methods shouldn't be accepted (compiler should issue an error)
* @compile/fail/ref=T6359949a.out -XDrawDiagnostics T6359949a.java
*/
class Example {
public static void example() {
}
}
class Test extends Example {
@Override
public static void example() {
}
}