check reference type as type argument for constructor params (IDEA-57668)

This commit is contained in:
anna
2012-10-23 18:07:09 +02:00
parent 0a00c340b2
commit 0f807e9219
4 changed files with 20 additions and 2 deletions
@@ -0,0 +1,17 @@
class A {
<T> A() {}
{
new <<error descr="Type argument cannot be of primitive type">int</error>>A();
}
}
class B<T> {
{
new B<<error descr="Type argument cannot be of primitive type">int</error>>();
B.<<error descr="Type argument cannot be of primitive type">int</error>>m();
}
<S> void m(){}
}
@@ -151,6 +151,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA89801() throws Exception { doTest(false); }
public void testIDEA67681() throws Exception { doTest(false); }
public void testIDEA67599() throws Exception { doTest(false); }
public void testIDEA57668() throws Exception { doTest(false); }
public void testInconvertibleTypes() throws Exception { doTest(false); }
public void testIncompatibleReturnType() throws Exception { doTest(false); }
public void testContinueInferenceAfterFirstRawResult() throws Exception { doTest(false); }