test/tools/javac/defaultMethods/Neg09.java

Mon, 23 Sep 2013 17:27:38 +0400

author
kizune
date
Mon, 23 Sep 2013 17:27:38 +0400
changeset 2048
809a50f24d6f
parent 2020
bb7271e64ef6
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7154966: CRs found to be in Fixed state with no test and no noreg- keyword.
Reviewed-by: ksrini

     1 /* @test /nodynamiccopyright/
     2  * @bug 7192246
     3  * @summary check that default overrides are properly type-checked
     4  * @compile/fail/ref=Neg09.out -Werror -Xlint:unchecked -XDrawDiagnostics Neg09.java
     5  */
     6 import java.util.List;
     8 class Neg09 {
     9     interface I {
    10         default List<String> m() { return null; }
    11     }
    13     static class C1 {
    14         public List m() { return null; } //unchecked (return) override
    15     }
    17     static class C2 extends C1 implements I { }
    19     static class C3 implements I {
    20         public List m() { return null; } //unchecked (return) override
    21     }
    22 }

mercurial