46 references to IsEnumType
Microsoft.CodeAnalysis.CSharp (46)
Binder\Binder_Conversions.cs (1)
3196
if ((object)destination != null && destination.
IsEnumType
())
Binder\Binder_Expressions.cs (3)
8522
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
8633
else if (constantValueOpt != null && fieldType.
IsEnumType
())
8667
return this.InFieldInitializer && (object)containingType != null && containingType.
IsEnumType
();
Binder\Binder_Operators.cs (2)
3591
if (operandType.
IsEnumType
() && targetType.
IsEnumType
())
Binder\Binder_Statements.cs (1)
3840
if (containingType.IsStructType() || containingType.
IsEnumType
())
Binder\PatternExplainer.cs (1)
693
bool requiresCast = (type.
IsEnumType
() || requireExactType || type.IsNativeIntegerType) &&
Binder\Semantics\Conversions\ConversionsBase.cs (7)
1452
bool validType = destination.
IsEnumType
() ||
1453
destination.IsNullableType() && destination.GetNullableUnderlyingType().
IsEnumType
();
2219
if (IsNumericType(source) && destination.
IsEnumType
())
2224
if (IsNumericType(destination) && source.
IsEnumType
())
2229
if (source.
IsEnumType
() && destination.
IsEnumType
())
3853
if (source.SpecialType == SpecialType.System_Enum && destination.
IsEnumType
())
CodeGen\EmitArrayInitializer.cs (2)
255
if (elementType.
IsEnumType
())
696
Debug.Assert(!elementType.
IsEnumType
());
CodeGen\EmitConversion.cs (2)
291
if (fromType.
IsEnumType
())
300
if (toType.
IsEnumType
())
CodeGen\EmitExpression.cs (5)
1017
if (elementType.
IsEnumType
())
1376
return type.
IsEnumType
();
1433
if (type.
IsEnumType
())
3214
if (elementType.
IsEnumType
())
3312
if (type.
IsEnumType
())
CodeGen\EmitOperators.cs (1)
676
Debug.Assert(enumType.
IsEnumType
());
CodeGen\EmitStatement.cs (1)
202
if (ts.
IsEnumType
())
Compilation\CSharpCompilation.cs (6)
1717
if (typeArgument.
IsEnumType
())
4319
if (csharpLeftType.
IsEnumType
() || csharpRightType.
IsEnumType
())
4357
if (csharpLeftType.
IsEnumType
() &&
4364
if (csharpRightType.
IsEnumType
() &&
4507
if (csharpOperandType.
IsEnumType
() &&
Emitter\Model\NamedTypeReference.cs (1)
65
return UnderlyingNamedType.
IsEnumType
();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
539
conversion.Type.StrippedType().
IsEnumType
())
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
951
type.
IsEnumType
();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (6)
499
Debug.Assert(rewrittenOperand.Type.
IsEnumType
());
510
Debug.Assert(rewrittenType.
IsEnumType
());
1113
if (typeFrom.
IsEnumType
())
1121
else if (typeTo.
IsEnumType
())
1543
SpecialType t0Type = t0.
IsEnumType
() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType;
1544
SpecialType s0Type = s0.
IsEnumType
() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType;
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
1024
Debug.Assert(underlyingType.
IsEnumType
());
Symbols\Attributes\SourceAttributeData.cs (1)
308
if (parameterType.
IsEnumType
())
Symbols\Source\ParameterHelpers.cs (1)
806
!(parameterType.GetNullableUnderlyingType().
IsEnumType
() || parameterType.GetNullableUnderlyingType().IsIntrinsicType()))
Symbols\TypeSymbolExtensions.cs (2)
53
return typeSymbol.IsReferenceType || typeSymbol.
IsEnumType
() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType;
280
if (type.
IsEnumType
())