test/tools/javac/generics/7034019/T7034019d.java

changeset 0
959103a6100f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/generics/7034019/T7034019d.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,23 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug 7034019
     1.7 + * @summary ClassCastException in javac with conjunction types
     1.8 + *
     1.9 + * @compile/fail/ref=T7034019d.out -XDrawDiagnostics T7034019d.java
    1.10 + */
    1.11 +
    1.12 +class T7034019c {
    1.13 +    interface A {
    1.14 +        abstract <T extends Number> T foo();
    1.15 +    }
    1.16 +
    1.17 +    interface B {
    1.18 +        abstract <T> T foo();
    1.19 +    }
    1.20 +
    1.21 +    static abstract class E implements A,B {
    1.22 +        void test() {
    1.23 +            foo();
    1.24 +        }
    1.25 +    }
    1.26 +}

mercurial