2010-04-14 12:31:55 +01:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
2011-03-07 14:31:50 +00:00
|
|
|
* @bug 6939620 7020044
|
2010-04-14 12:31:55 +01:00
|
|
|
*
|
2011-03-07 14:31:50 +00:00
|
|
|
* @summary Check that 'complex' diamond can infer type that is too specific
|
2010-04-14 12:31:55 +01:00
|
|
|
* @author mcimadamore
|
2013-01-21 20:13:56 +00:00
|
|
|
* @compile/fail/ref=Neg10.out -source 7 -Xlint:-options Neg10.java -XDrawDiagnostics
|
|
|
|
* @compile Neg10.java -XDrawDiagnostics
|
2010-04-14 12:31:55 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Neg10 {
|
|
|
|
static class Foo<X> {
|
|
|
|
Foo(X x) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
Foo<Number> fw = new Foo<>(1);
|
|
|
|
}
|