testdata for ClassType::<TypeArguments>new method references: ensure compilation error if ClassType is raw but type arguments are given

This commit is contained in:
Anna Kozlova
2015-01-31 16:13:13 +03:00
parent 82246db879
commit a6d8e976fa
2 changed files with 15 additions and 0 deletions
@@ -0,0 +1,11 @@
import java.util.concurrent.Callable;
class Test<T> {
public <P> Test() {
}
{
Callable<Test<String>> c = <error descr="Bad return type in method reference: cannot convert Test to Test<java.lang.String>">Test::<String>new</error>;
Callable<Test<String>> c1 = Test<String>::<String>new;
}
}