53 references to IsEnumType
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_Conversions.cs (1)
1642
if ((object)destination != null && destination.
IsEnumType
())
Binder\Binder_Expressions.cs (3)
7439
var isEnumField = (fieldSymbol.IsStatic && type.
IsEnumType
());
7550
else if (constantValueOpt != null && fieldType.
IsEnumType
())
7584
return this.InFieldInitializer && (object)containingType != null && containingType.
IsEnumType
();
Binder\Binder_Operators.cs (2)
3514
if (operandType.
IsEnumType
() && targetType.
IsEnumType
())
Binder\Binder_Statements.cs (1)
3739
if (containingType.IsStructType() || containingType.
IsEnumType
())
Binder\PatternExplainer.cs (1)
693
bool requiresCast = (type.
IsEnumType
() || requireExactType || type.IsNativeIntegerType) &&
Binder\Semantics\Conversions\ConversionsBase.cs (7)
1377
bool validType = destination.
IsEnumType
() ||
1378
destination.IsNullableType() && destination.GetNullableUnderlyingType().
IsEnumType
();
2070
if (IsNumericType(source) && destination.
IsEnumType
())
2075
if (IsNumericType(destination) && source.
IsEnumType
())
2080
if (source.
IsEnumType
() && destination.
IsEnumType
())
3614
if (source.SpecialType == SpecialType.System_Enum && destination.
IsEnumType
())
CodeGen\EmitArrayInitializer.cs (1)
252
if (elementType.
IsEnumType
())
CodeGen\EmitConversion.cs (2)
290
if (fromType.
IsEnumType
())
299
if (toType.
IsEnumType
())
CodeGen\EmitExpression.cs (5)
988
if (elementType.
IsEnumType
())
1336
return type.
IsEnumType
();
1393
if (type.
IsEnumType
())
2996
if (elementType.
IsEnumType
())
3094
if (type.
IsEnumType
())
CodeGen\EmitOperators.cs (1)
604
Debug.Assert(enumType.
IsEnumType
());
CodeGen\EmitStatement.cs (1)
202
if (ts.
IsEnumType
())
Compilation\CSharpCompilation.cs (5)
4005
if (csharpLeftType.
IsEnumType
() || csharpRightType.
IsEnumType
())
4043
if (csharpLeftType.
IsEnumType
() &&
4050
if (csharpRightType.
IsEnumType
() &&
4193
if (csharpOperandType.
IsEnumType
() &&
Emitter\Model\NamedTypeReference.cs (1)
65
return UnderlyingNamedType.
IsEnumType
();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
473
conversion.Type.StrippedType().
IsEnumType
())
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
935
type.
IsEnumType
();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (6)
490
Debug.Assert(rewrittenOperand.Type.
IsEnumType
());
501
Debug.Assert(rewrittenType.
IsEnumType
());
971
if (typeFrom.
IsEnumType
())
979
else if (typeTo.
IsEnumType
())
1390
SpecialType t0Type = t0.
IsEnumType
() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType;
1391
SpecialType s0Type = s0.
IsEnumType
() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType;
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
1007
Debug.Assert(underlyingType.
IsEnumType
());
Symbols\Attributes\SourceAttributeData.cs (1)
274
if (parameterType.
IsEnumType
())
Symbols\BaseTypeAnalysis.cs (1)
247
if (type.
IsEnumType
())
Symbols\Source\ParameterHelpers.cs (1)
779
!(parameterType.GetNullableUnderlyingType().
IsEnumType
() || parameterType.GetNullableUnderlyingType().IsIntrinsicType()))
Symbols\TypeSymbolExtensions.cs (2)
45
return typeSymbol.IsReferenceType || typeSymbol.
IsEnumType
() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType;
259
if (type.
IsEnumType
())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\OperatorTests.cs (8)
7611
if (op == UnaryOperatorKind.LogicalNegation && type.
IsEnumType
())
8232
leftType.
IsEnumType
() && (rightType.IsIntegralType() || rightType.IsCharType()) &&
8239
rightType.
IsEnumType
() && (leftType.IsIntegralType() || leftType.IsCharType()) &&
8246
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8256
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8263
leftType.
IsEnumType
() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
8377
else if ((leftType.
IsEnumType
() || leftType.IsPointerType()) && (rightType.IsIntegralType() || rightType.IsCharType()))
8383
else if ((rightType.
IsEnumType
() || rightType.IsPointerType()) && (leftType.IsIntegralType() || leftType.IsCharType()))