completion inside method call after new could use return type constrains/other variables ignoring unresolved IntellijIdeaRulezz type (IDEA-144885)

This commit is contained in:
Anna Kozlova
2015-09-18 14:37:16 +03:00
parent 8b322fadb7
commit 4487019854
4 changed files with 21 additions and 0 deletions
@@ -0,0 +1,5 @@
class D<T> {
D(T t) {}
D<Integer> reference = new D<>(new Integer(hashCode()));
}
@@ -0,0 +1,5 @@
class D<T> {
D(T t) {}
D<Integer> reference = new D<>(new <caret>);
}
@@ -146,6 +146,13 @@ public void testConvertToObjectStream() {
checkResultByFile("/" + getTestName(false) + "-out.java");
}
public void testInferFromReturnTypeWhenCompleteInsideArgList() {
configureByTestName();
myFixture.complete(CompletionType.SMART, 1);
myFixture.type('\n');
checkResultByFile("/" + getTestName(false) + "-out.java");
}
public void testCollectorsToList() {
doTest(false);
}