boolean (PsiExpression value) { if (!ExpressionUtils.isSafelyRecomputableExpression(value)) return false; PsiReferenceExpression ref = tryCast(PsiUtil.skipParenthesizedExprDown(value), PsiReferenceExpression.class); if (ref != null && !ref.isQualified()) { PsiVariable target = tryCast(ref.resolve(), PsiVariable.class); if (target instanceof PsiLocalVariable) return false; if (target instanceof PsiParameter) { PsiElement block = ((PsiParameter)target).getDeclarationScope(); return block instanceof PsiMethod && HighlightControlFlowUtil.isEffectivelyFinal(target, block, null); } } return true; }