diamonds: cannot use diamonds with explicit constructor types/disable checks on type args for non generics constructors (sic!?)

This commit is contained in:
anna
2011-05-17 21:00:44 +04:00
parent 1ccbc4e984
commit 097a350597
11 changed files with 39 additions and 49 deletions
@@ -0,0 +1,13 @@
class Pos8 {
static class Foo<X> {
Foo(X t) {}
}
Foo<Integer> fi1 = new Foo<>(1);
Foo<Integer> fi2 = new Foo<Integer>(1);
Foo<Integer> fi3 = new <String> Foo<<error descr="Cannot use diamonds with explicit type parameters for constructor"></error>>(1);
Foo<Integer> fi4 = new <String> Foo<Integer>(1);
Foo<Integer> fi5 = new <String, String> Foo<<error descr="Cannot use diamonds with explicit type parameters for constructor"></error>>(1);
Foo<Integer> fi6 = new <String, String> Foo<Integer>(1);
}