constructor refs: forbid raw constructor references with explicit new type args

(cherry picked from commit a127d801aa080f2efe3784edd5cca419dccfda2e)
This commit is contained in:
anna
2013-11-25 16:47:57 +01:00
parent f66adc7985
commit e3197b6581
4 changed files with 60 additions and 0 deletions
@@ -0,0 +1,13 @@
class Test {
interface I {
Object _();
}
static class Foo<X> {}
static class Foo1 {}
void testAssign() {
I o = <error descr="Raw constructor reference with explicit type parameters for constructor">Foo::<String>new</error>;
I o1 = Foo1::<String>new;
}
}