private Diagnostic validateIfEnumToStringComparison(final String literalValue, final ValueType validateIfEnum)
{
if (validateIfEnum.isEnumType()
&& validateIfEnum instanceof IObjectSymbolBasedValueType)
{
final IObjectSymbolBasedValueType symbolValueType =
(IObjectSymbolBasedValueType) validateIfEnum;
IType type = symbolValueType.getSymbol().getTypeDescriptor().resolveType(symbolValueType.getSymbol().getTypeDescriptor().getTypeSignature());
if (type != null && !TypeUtil.isEnumMember(type, literalValue))
{
return _diagnosticFactory.
create_BINARY_COMPARISON_WITH_ENUM_AND_CONST_ALWAYS_SAME