PsiExpression (PsiExpression thenValue, PsiType requiredType) { if (thenValue instanceof PsiNewExpression) { if (!PsiDiamondTypeUtil.canChangeContextForDiamond((PsiNewExpression)thenValue, requiredType)) { return PsiDiamondTypeUtil.expandTopLevelDiamondsInside(thenValue); } } return thenValue; }