Return (@NotNull Return ret, @Nullable Instruction prev) { PsiVariable retVariable = getReturnVariable(ret); if (retVariable == null) return null; Declaration declaration = tryCast(prev, Declaration.class); if (declaration != null) return mergeReturn(retVariable, declaration.myLhs, declaration.myRhs); Assignment assignment = tryCast(prev, Assignment.class); if (assignment != null) return mergeReturn(retVariable, assignment.myLhs, assignment.myRhs); return null; }