2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-06-05 17:57:10 +00:00
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 4041948 4022450
|
2007-12-01 00:00:00 +00:00
|
|
|
* @summary javac previously allowed static methods to override non-static
|
|
|
|
* methods in some cases.
|
2014-06-05 17:57:10 +00:00
|
|
|
* @author turnidge
|
2007-12-01 00:00:00 +00:00
|
|
|
*
|
2014-06-05 17:57:10 +00:00
|
|
|
* @compile/fail/ref=StaticOverride.out -XDrawDiagnostics StaticOverride.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
interface I{
|
|
|
|
int f();
|
|
|
|
}
|
|
|
|
|
|
|
|
class C {
|
|
|
|
public static int f() {
|
|
|
|
return 7;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class StaticOverride extends C implements I { }
|