2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-08-29 07:42:42 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5007379
|
|
|
|
* @summary Compiler allows inheritance of multiple methods with unrelated return types
|
|
|
|
* @author gafter
|
|
|
|
*
|
2014-08-29 07:42:42 +00:00
|
|
|
* @compile/fail/ref=BadCovar.out -XDrawDiagnostics BadCovar.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package bad.covar;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
interface A{
|
|
|
|
List<? extends A> f();
|
|
|
|
}
|
|
|
|
|
|
|
|
interface B{
|
|
|
|
List<? extends B> f();
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class C implements A, B {} // should give error
|