author | hseigel |
Wed, 02 Mar 2016 23:48:41 +0000 | |
changeset 36397 | c487ced7231c |
parent 33713 | dc1d2632935c |
permissions | -rw-r--r-- |
33713
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
1 |
/* |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
3 |
* @bug 8139255 |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
4 |
* @summary javac emits diagnostic message as overriding instead of hiding for class methods. |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
5 |
* @compile/fail/ref=T8139255.out -XDrawDiagnostics T8139255.java |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
6 |
*/ |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
7 |
|
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
8 |
public class T8139255 { |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
9 |
static void func() { } |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
10 |
} |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
11 |
|
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
12 |
class T8139255_1 extends T8139255 { |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
13 |
static int func() { return 0; } |
dc1d2632935c
8139255: javac reports "cannot override" messages instead of "cannot hide" messages for static methods
sadayapalam
parents:
diff
changeset
|
14 |
} |