Maurizio Cimadamore d3fa7f79ad 6939620: Switch to 'complex' diamond inference scheme
Implement new inference scheme for diamond operator that takes into account type of actual arguments supplied to constructor

Reviewed-by: jjg, darcy
2010-04-14 12:31:55 +01:00

23 lines
706 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6939620 6894753
*
* @summary Switch to 'complex' diamond inference scheme
* @author mcimadamore
* @compile/fail/ref=Neg09.out Neg09.java -XDrawDiagnostics
*
*/
class Neg09 {
static class Foo<X extends Number & Comparable<Number>> {}
static class DoubleFoo<X extends Number & Comparable<Number>,
Y extends Number & Comparable<Number>> {}
static class TripleFoo<X extends Number & Comparable<Number>,
Y extends Number & Comparable<Number>,
Z> {}
Foo<?> fw = new Foo<>();
DoubleFoo<?,?> dw = new DoubleFoo<>();
TripleFoo<?,?,?> tw = new TripleFoo<>();
}