2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-01-27 23:11:57 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5017254
|
|
|
|
* @summary compiler fails to shadow inapplicable method with static import
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-01-27 23:11:57 +00:00
|
|
|
* @compile/fail/ref=Shadow.out -XDrawDiagnostics Shadow.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package shadow;
|
|
|
|
|
|
|
|
import static shadow.T1.*;
|
|
|
|
import static shadow.T2.m1;
|
|
|
|
|
|
|
|
class T1 {
|
|
|
|
public static void m1() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class T2 {
|
|
|
|
public static void m1(int i) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Test {
|
|
|
|
void foo() {
|
|
|
|
m1(); // <-- is this an error?
|
|
|
|
}
|
|
|
|
}
|