Wed, 27 Jul 2011 19:01:08 +0100
7046778: Project Coin: problem with diamond and member inner classes
Summary: Diamond inference generates spurious error messages when target type is a member inner class
Reviewed-by: jjg
mcimadamore@537 | 1 | /* |
mcimadamore@537 | 2 | * @test /nodynamiccopyright/ |
mcimadamore@914 | 3 | * @bug 6939620 7020044 |
mcimadamore@537 | 4 | * |
mcimadamore@914 | 5 | * @summary Check that diamond works where LHS is supertype of RHS (nilary constructor) |
mcimadamore@537 | 6 | * @author mcimadamore |
mcimadamore@537 | 7 | * @compile/fail/ref=Neg06.out Neg06.java -XDrawDiagnostics |
mcimadamore@537 | 8 | * |
mcimadamore@537 | 9 | */ |
mcimadamore@537 | 10 | |
mcimadamore@537 | 11 | class Neg06 { |
mcimadamore@537 | 12 | |
mcimadamore@537 | 13 | static class CSuperFoo<X> {} |
mcimadamore@537 | 14 | static class CFoo<X extends Number> extends CSuperFoo<X> {} |
mcimadamore@537 | 15 | |
mcimadamore@537 | 16 | CSuperFoo<String> csf1 = new CFoo<>(); |
mcimadamore@537 | 17 | } |