mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
lambda: use wildcard bound for inferred param
This commit is contained in:
@@ -123,7 +123,14 @@ public class LambdaUtil {
|
||||
if (methodSignature != null) {
|
||||
final PsiType[] types = methodSignature.getParameterTypes();
|
||||
if (parameterIndex < types.length) {
|
||||
return resolveResult.getSubstitutor().substitute(types[parameterIndex]);
|
||||
final PsiType psiType = resolveResult.getSubstitutor().substitute(types[parameterIndex]);
|
||||
if (psiType instanceof PsiWildcardType) {
|
||||
final PsiType bound = ((PsiWildcardType)psiType).getBound();
|
||||
if (bound != null) {
|
||||
return bound;
|
||||
}
|
||||
}
|
||||
return psiType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user