mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
EA-107704 - assert: InferenceSession.<init>
This commit is contained in:
@@ -253,10 +253,12 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
|
||||
return PsiSubstitutor.EMPTY;
|
||||
}
|
||||
|
||||
psiSubstitutor = helper.inferTypeArguments(PsiTypesUtil.filterUnusedTypeParameters(qContainingClass.getTypeParameters(), paramTypes),
|
||||
paramTypes,
|
||||
signature.getParameterTypes(),
|
||||
PsiUtil.getLanguageLevel(methodReferenceExpression));
|
||||
if (paramTypes.length == signature.getParameterTypes().length) {
|
||||
psiSubstitutor = helper.inferTypeArguments(PsiTypesUtil.filterUnusedTypeParameters(qContainingClass.getTypeParameters(), paramTypes),
|
||||
paramTypes,
|
||||
signature.getParameterTypes(),
|
||||
PsiUtil.getLanguageLevel(methodReferenceExpression));
|
||||
}
|
||||
}
|
||||
else {
|
||||
psiSubstitutor = PsiSubstitutor.EMPTY;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
class Foo<H> {
|
||||
|
||||
private <S> Foo(Foo<S> s, Foo... ss) {}
|
||||
|
||||
{
|
||||
foo(Foo::new);
|
||||
}
|
||||
|
||||
private <T> void foo(final Function<Foo, T> param) { }
|
||||
}
|
||||
@@ -176,6 +176,7 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testDistinguishCapturedWildcardsByDifferentParameters() { doTest(); }
|
||||
public void testConstructorRefOnClassWithRecursiveTypeParameter() { doTest(); }
|
||||
public void testWildcardInCheckedCompatibilityConstraints() { doTest(); }
|
||||
public void testConstructorReferenceWithVarargsParameters() { doTest(); }
|
||||
|
||||
public void testPreferErrorOnTopLevelToFailedSubstitutorOnNestedLevel() { doTest(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user