2013-09-10 11:47:51 +00:00
|
|
|
/* @test /nodynamiccopyright/
|
|
|
|
* @bug 7192246
|
2012-11-04 10:59:42 +00:00
|
|
|
* @summary check that default method must have most specific return type
|
2012-11-17 19:01:03 +00:00
|
|
|
* @compile/fail/ref=Neg04.out -XDrawDiagnostics Neg04.java
|
2012-11-04 10:59:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class Neg04 {
|
|
|
|
interface IA1 { Integer m(); }
|
|
|
|
interface IA2 extends IA1 { default Number m() { return Neg04.m(this); } } //error
|
|
|
|
|
|
|
|
abstract class C implements IA1, IA2 {}
|
|
|
|
|
|
|
|
static int m(IA2 a) { return 0; }
|
|
|
|
}
|