mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
completion inside method call after new could use return type constrains/other variables ignoring unresolved IntellijIdeaRulezz type (IDEA-144885)
This commit is contained in:
+4
@@ -53,6 +53,10 @@ public class ExpressionCompatibilityConstraint extends InputOutputConstraintForm
|
||||
if (exprType instanceof PsiLambdaParameterType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (exprType instanceof PsiClassType && ((PsiClassType)exprType).resolve() == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (exprType != null && exprType != PsiType.NULL) {
|
||||
constraints.add(new TypeCompatibilityConstraint(myT, exprType));
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
|
||||
class D<T> {
|
||||
D(T t) {}
|
||||
D<Integer> reference = new D<>(new Integer(hashCode()));
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
|
||||
class D<T> {
|
||||
D(T t) {}
|
||||
D<Integer> reference = new D<>(new <caret>);
|
||||
}
|
||||
+7
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user