mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
explicit type -> diamond: don't walk up throw lambda with explicit type
This commit is contained in:
@@ -153,9 +153,8 @@ public class PsiDiamondTypeUtil {
|
||||
typeElement = ((PsiVariable)gParent).getTypeElement();
|
||||
}
|
||||
else if (gParent instanceof PsiReturnStatement) {
|
||||
PsiMethod method = PsiTreeUtil.getParentOfType(gParent, PsiMethod.class);
|
||||
LOG.assertTrue(method != null);
|
||||
typeElement = method.getReturnTypeElement();
|
||||
PsiElement method = PsiTreeUtil.getParentOfType(gParent, PsiMethod.class, PsiLambdaExpression.class);
|
||||
typeElement = method instanceof PsiMethod ? ((PsiMethod)method).getReturnTypeElement() : null;
|
||||
}
|
||||
return typeElement != null && PsiAugmentProvider.getInferredType(typeElement) != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user