mcimadamore@1393: /* mcimadamore@1393: * @test /nodynamiccopyright/ mcimadamore@1393: * @summary check that default overrides are properly type-checked mcimadamore@1415: * @compile/fail/ref=Neg07.out -XDrawDiagnostics Neg07.java mcimadamore@1393: */ mcimadamore@1393: mcimadamore@1393: class Neg07 { mcimadamore@1393: interface I { mcimadamore@1393: default int m() { return 1; } mcimadamore@1393: } mcimadamore@1393: mcimadamore@1393: static class C1 { mcimadamore@1393: public void m() { } //incompatible return mcimadamore@1393: } mcimadamore@1393: mcimadamore@1393: static class C2 extends C1 implements I { } mcimadamore@1393: mcimadamore@1393: static class C3 implements I { mcimadamore@1393: public void m() { } //incompatible return mcimadamore@1393: } mcimadamore@1393: }