boolean (PsiField suggested, PsiReferenceExpression expression) { if (ExpressionUtils.isVoidContext(expression)) return true; PsiType expectedType = ExpectedTypeUtils.findExpectedType(expression, true); if (expectedType == null) return true; PsiType suggestedType = suggested.getType(); return TypeConversionUtil.isAssignable(expectedType, suggestedType); }