47 references to IsEnumType
Microsoft.CodeAnalysis.CSharp (47)
Binder\Binder_Conversions.cs (1)
3918
if ((object)destination != null && destination.
IsEnumType
())
Binder\Binder_Expressions.cs (4)
9129
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
9257
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
9268
else if (fieldSymbol.IsConst && fieldType.
IsEnumType
())
9293
return this.InFieldInitializer && (object)containingType != null && containingType.
IsEnumType
();
Binder\Binder_Operators.cs (2)
5265
if (operandType.
IsEnumType
() && targetType.
IsEnumType
())
Binder\Binder_Statements.cs (1)
3919
if (containingType.IsStructType() || containingType.
IsEnumType
() || containingType.IsExtension)
Binder\PatternExplainer.cs (1)
832
bool requiresCast = (type.
IsEnumType
() || requireExactType || type.IsNativeIntegerType) &&
Binder\Semantics\Conversions\ConversionsBase.cs (7)
1467
bool validType = destination.
IsEnumType
() ||
1468
destination.IsNullableType() && destination.GetNullableUnderlyingType().
IsEnumType
();
2233
if (IsNumericType(source) && destination.
IsEnumType
())
2238
if (IsNumericType(destination) && source.
IsEnumType
())
2243
if (source.
IsEnumType
() && destination.
IsEnumType
())
3873
if (source.SpecialType == SpecialType.System_Enum && destination.
IsEnumType
())
CodeGen\EmitArrayInitializer.cs (2)
254
if (elementType.
IsEnumType
())
694
Debug.Assert(!elementType.
IsEnumType
());
CodeGen\EmitConversion.cs (2)
322
if (fromType.
IsEnumType
())
331
if (toType.
IsEnumType
())
CodeGen\EmitExpression.cs (5)
1028
if (elementType.
IsEnumType
())
1387
return type.
IsEnumType
();
1444
if (type.
IsEnumType
())
3258
if (elementType.
IsEnumType
())
3356
if (type.
IsEnumType
())
CodeGen\EmitOperators.cs (1)
676
Debug.Assert(enumType.
IsEnumType
());
CodeGen\EmitStatement.cs (1)
202
if (ts.
IsEnumType
())
Compilation\CSharpCompilation.cs (6)
1800
if (typeArgument.
IsEnumType
())
4531
if (csharpLeftType.
IsEnumType
() || csharpRightType.
IsEnumType
())
4569
if (csharpLeftType.
IsEnumType
() &&
4576
if (csharpRightType.
IsEnumType
() &&
4719
if (csharpOperandType.
IsEnumType
() &&
Emitter\Model\NamedTypeReference.cs (1)
66
return UnderlyingNamedType.
IsEnumType
();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
546
conversion.Type.StrippedType().
IsEnumType
())
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
1082
type.
IsEnumType
();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (6)
504
Debug.Assert(rewrittenOperand.Type.
IsEnumType
());
515
Debug.Assert(rewrittenType.
IsEnumType
());
1181
if (typeFrom.
IsEnumType
())
1189
else if (typeTo.
IsEnumType
())
1657
SpecialType t0Type = t0.
IsEnumType
() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType;
1658
SpecialType s0Type = s0.
IsEnumType
() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType;
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
1183
Debug.Assert(underlyingType.
IsEnumType
());
Symbols\Attributes\SourceAttributeData.cs (1)
308
if (parameterType.
IsEnumType
())
Symbols\Source\ParameterHelpers.cs (1)
1018
!(parameterType.GetNullableUnderlyingType().
IsEnumType
() || parameterType.GetNullableUnderlyingType().IsIntrinsicType()))
Symbols\TypeSymbolExtensions.cs (2)
54
return typeSymbol.IsReferenceType || typeSymbol.
IsEnumType
() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType;
298
if (type.
IsEnumType
())