mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[reactor] *NonBlockingScopeInspection should check lambdas also
This commit is contained in:
@@ -39,6 +39,7 @@ public final class AnalysisUastUtil {
|
||||
|
||||
@Nullable
|
||||
public static PsiClass getTypePsiClass(@Nullable PsiType type) {
|
||||
type = GenericsUtil.eliminateWildcards(type);
|
||||
if (!(type instanceof PsiClassType)) return null;
|
||||
return ((PsiClassType)type).rawType().resolve();
|
||||
}
|
||||
|
||||
@@ -196,6 +196,7 @@ fun UCallExpression.getParameterForArgument(arg: UExpression): PsiParameter? {
|
||||
return parameters.withIndex().find { (i, p) ->
|
||||
val argumentForParameter = getArgumentForParameter(i) ?: return@find false
|
||||
if (argumentForParameter == arg) return@find true
|
||||
if (arg is ULambdaExpression && arg.sourcePsi?.parent == argumentForParameter.sourcePsi) return@find true // workaround for KT-25297
|
||||
if (p.isVarArgs && argumentForParameter is UExpressionList) return@find argumentForParameter.expressions.contains(arg)
|
||||
return@find false
|
||||
}?.value
|
||||
|
||||
Reference in New Issue
Block a user