Neg11.java revision 1414:01c9d4161882
11553Srgrimes/*
21553Srgrimes * @test /nodynamiccopyright/
31553Srgrimes * @summary check that default overrides are properly type-checked
41553Srgrimes * @compile/fail/ref=Neg11.out -XDrawDiagnostics Neg11.java
51553Srgrimes */
61553Srgrimesclass Neg11 {
71553Srgrimes    interface I {
81553Srgrimes        default void m() { }
91553Srgrimes    }
101553Srgrimes
111553Srgrimes    static class C1 {
121553Srgrimes        public void m() throws Exception { } //bad throws
131553Srgrimes    }
141553Srgrimes
151553Srgrimes    static class C2 extends C1 implements I { }
161553Srgrimes
171553Srgrimes    static class C3 implements I {
181553Srgrimes        public void m() throws Exception { } //bad throws
191553Srgrimes    }
201553Srgrimes}
211553Srgrimes