reject type args for constructor of a class without type params (IDEA-102239)

This commit is contained in:
anna
2013-03-01 20:05:18 +01:00
parent 4fd6cc48b6
commit fcd09e4b99
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,22 @@
class Foo {
{
Foo f = new Foo<error descr="Type 'Foo' does not have type parameters"><String></error>();
Foo.<String>foo();
}
static void foo() {}
}
class Bar {
<T> Bar() {}
{
Bar b = new <String>Bar();
}
}
class Baz {
Baz() {}
{
Baz b = new <String>Baz();
}
}