mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
[unused declaration] take into account non-local returns (IDEA-295261)
GitOrigin-RevId: 772f91c8fe5614b0075394979f383e2810a6d3a8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6133b930b9
commit
b582eff8c3
@@ -312,7 +312,11 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
refMethod = (RefMethodImpl)refFrom;
|
||||
}
|
||||
else if (refFrom instanceof RefFunctionalExpression) {
|
||||
if (decl instanceof ULambdaExpression) {
|
||||
UElement target = node.getJumpTarget();
|
||||
if (target instanceof UMethod) {
|
||||
refMethod = ObjectUtils.tryCast(refManager.getReference(target.getSourcePsi()), RefMethodImpl.class);
|
||||
}
|
||||
else if (decl instanceof ULambdaExpression) {
|
||||
PsiMethod lambdaMethod = LambdaUtil.getFunctionalInterfaceMethod(((ULambdaExpression)decl).getFunctionalInterfaceType());
|
||||
refMethod = ObjectUtils.tryCast(refManager.getReference(lambdaMethod), RefMethodImpl.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user