mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inference: fix for incomplete constructor call without argument list
EA-144940 - IAE: RecursionManager$.$$$reportNull$$$ GitOrigin-RevId: 7367e1bccdcb5d0373293e44dd8afdfb105ee311
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d50a5e1d6a
commit
206d647c3d
@@ -447,10 +447,14 @@ public class MethodCandidateInfo extends CandidateInfo{
|
||||
.inferTypeArguments(typeParameters, method.getParameterList().getParameters(), arguments, this, parent, policy,
|
||||
myLanguageLevel);
|
||||
};
|
||||
PsiSubstitutor substitutor = !includeReturnConstraint
|
||||
? ourOverloadGuard.doPreventingRecursion(myArgumentList, false, computable)
|
||||
: computable.compute();
|
||||
return ObjectUtils.assertNotNull(substitutor);
|
||||
if (!includeReturnConstraint) {
|
||||
return myArgumentList == null
|
||||
? PsiSubstitutor.EMPTY
|
||||
: ObjectUtils.assertNotNull(ourOverloadGuard.doPreventingRecursion(myArgumentList, false, computable));
|
||||
}
|
||||
else {
|
||||
return computable.compute();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isRawSubstitution() {
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import java.lang.String;
|
||||
|
||||
class X {
|
||||
<S> X(int i){}
|
||||
<T> X(String s){}
|
||||
{
|
||||
new <caret>X
|
||||
}
|
||||
}
|
||||
+9
-1
@@ -64,7 +64,7 @@ public class GotoDeclarationTest extends LightCodeInsightTestCase {
|
||||
assertEquals("java.lang", JavaDirectoryService.getInstance().getPackage(element).getQualifiedName());
|
||||
}
|
||||
|
||||
public void testMultipleConstructors() {
|
||||
private void doTestMultipleConstructors() {
|
||||
String name = getTestName(false);
|
||||
configureByFile("/codeInsight/gotoDeclaration/" + name + ".java");
|
||||
final int offset = getEditor().getCaretModel().getOffset();
|
||||
@@ -79,6 +79,14 @@ public class GotoDeclarationTest extends LightCodeInsightTestCase {
|
||||
assertEquals(candidates.toString(), 2, candidates.size());
|
||||
}
|
||||
|
||||
public void testMultipleConstructors() {
|
||||
doTestMultipleConstructors();
|
||||
}
|
||||
|
||||
public void testMultipleGenericConstructorsOnIncompleteCall() {
|
||||
doTestMultipleConstructors();
|
||||
}
|
||||
|
||||
public void testMultipleConstructorsButArrayCreation() {
|
||||
String name = getTestName(false);
|
||||
configureByFile("/codeInsight/gotoDeclaration/" + name + ".java");
|
||||
|
||||
Reference in New Issue
Block a user