56 references to IsEnumType
Microsoft.CodeAnalysis.CSharp (47)
Binder\Binder_Conversions.cs (1)
3840
if ((object)destination != null && destination.
IsEnumType
())
Binder\Binder_Expressions.cs (4)
9136
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
9264
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
9275
else if (fieldSymbol.IsConst && fieldType.
IsEnumType
())
9300
return this.InFieldInitializer && (object)containingType != null && containingType.
IsEnumType
();
Binder\Binder_Operators.cs (2)
5238
if (operandType.
IsEnumType
() && targetType.
IsEnumType
())
Binder\Binder_Statements.cs (1)
3919
if (containingType.IsStructType() || containingType.
IsEnumType
() || containingType.IsExtension)
Binder\PatternExplainer.cs (1)
824
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)
1799
if (typeArgument.
IsEnumType
())
4529
if (csharpLeftType.
IsEnumType
() || csharpRightType.
IsEnumType
())
4567
if (csharpLeftType.
IsEnumType
() &&
4574
if (csharpRightType.
IsEnumType
() &&
4717
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
());
1178
if (typeFrom.
IsEnumType
())
1186
else if (typeTo.
IsEnumType
())
1641
SpecialType t0Type = t0.
IsEnumType
() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType;
1642
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)
1028
!(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
())
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\InlineArrayTests.cs (1)
826
Assert.True(buffer.
IsEnumType
());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\OperatorTests.cs (8)
7613
if (op == UnaryOperatorKind.LogicalNegation && type.
IsEnumType
())
8234
leftType.
IsEnumType
() && (rightType.IsIntegralType() || rightType.IsCharType()) &&
8241
rightType.
IsEnumType
() && (leftType.IsIntegralType() || leftType.IsCharType()) &&
8248
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8258
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8265
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8379
else if ((leftType.
IsEnumType
() || leftType.IsPointerType()) && (rightType.IsIntegralType() || rightType.IsCharType()))
8385
else if ((rightType.
IsEnumType
() || rightType.IsPointerType()) && (leftType.IsIntegralType() || leftType.IsCharType()))