author | sogoel |
Tue, 27 Jan 2015 15:11:57 -0800 | |
changeset 28705 | 675cb37e74a8 |
parent 5520 | 86e4b9a9da40 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
28705
675cb37e74a8
8068463: Group 10c: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 5017254 |
4 |
* @summary compiler fails to shadow inapplicable method with static import |
|
5 |
* @author gafter |
|
6 |
* |
|
28705
675cb37e74a8
8068463: Group 10c: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=Shadow.out -XDrawDiagnostics Shadow.java |
10 | 8 |
*/ |
9 |
||
10 |
package shadow; |
|
11 |
||
12 |
import static shadow.T1.*; |
|
13 |
import static shadow.T2.m1; |
|
14 |
||
15 |
class T1 { |
|
16 |
public static void m1() {} |
|
17 |
} |
|
18 |
||
19 |
class T2 { |
|
20 |
public static void m1(int i) {} |
|
21 |
} |
|
22 |
||
23 |
class Test { |
|
24 |
void foo() { |
|
25 |
m1(); // <-- is this an error? |
|
26 |
} |
|
27 |
} |