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