mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
lambda: use correct subst
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ public class RedundantLambdaParameterTypeInspection extends BaseJavaLocalInspect
|
||||
|
||||
for (PsiTypeParameter parameter : typeParameters) {
|
||||
final PsiType psiType = substitutor.substitute(parameter);
|
||||
if (psiType == null || LambdaUtil.dependsOnTypeParams(psiType, expression)) return;
|
||||
if (psiType == null || LambdaUtil.dependsOnTypeParams(psiType, expression, parameter)) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -892,7 +892,7 @@ public class PsiResolveHelperImpl implements PsiResolveHelper {
|
||||
}
|
||||
final PsiMethod method = LambdaUtil.getFunctionalInterfaceMethod(functionalInterfaceType);
|
||||
if (method == null || methodParamsDependOnTypeParams((PsiLambdaExpression)expression, method.getParameterList().getParameters(),
|
||||
substitutor, typeParameter)) {
|
||||
PsiUtil.resolveGenericsClassInType(functionalInterfaceType).getSubstitutor(), typeParameter)) {
|
||||
return getFailedInferenceConstraint(typeParameter);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user