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