Srinivas Dama 9bf5e9c8f4 8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
Improve clarity of javac messages by discriminating hiding scenerio from overriding

Reviewed-by: mcimadamore, sadayapalam
2015-11-12 08:39:23 +05:30

15 lines
349 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8139255
* @summary javac emits diagnostic message as overriding instead of hiding for class methods.
* @compile/fail/ref=T8139255.out -XDrawDiagnostics T8139255.java
*/
public class T8139255 {
static void func() { }
}
class T8139255_1 extends T8139255 {
static int func() { return 0; }
}