test/tools/javac/generics/diamond/neg/Neg06.java

changeset 537
9d9d08922405
child 914
ca32f2986301
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/generics/diamond/neg/Neg06.java	Wed Apr 14 12:31:55 2010 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug 6939620
     1.7 + *
     1.8 + * @summary  Switch to 'complex' diamond inference scheme
     1.9 + * @author mcimadamore
    1.10 + * @compile/fail/ref=Neg06.out Neg06.java -XDrawDiagnostics
    1.11 + *
    1.12 + */
    1.13 +
    1.14 +class Neg06 {
    1.15 +   interface ISuperFoo<X> {}
    1.16 +   interface IFoo<X extends Number> extends ISuperFoo<X> {}
    1.17 +
    1.18 +   static class CSuperFoo<X> {}
    1.19 +   static class CFoo<X extends Number> extends CSuperFoo<X> {}
    1.20 +
    1.21 +   ISuperFoo<String> isf = new IFoo<>() {};
    1.22 +   CSuperFoo<String> csf1 = new CFoo<>();
    1.23 +   CSuperFoo<String> csf2 = new CFoo<>() {};
    1.24 +}

mercurial