27 references to GetEnumUnderlyingType
Microsoft.CodeAnalysis.CSharp (27)
Binder\Binder_Expressions.cs (1)
1528return ConstantValue.CreateSizeOf((type.GetEnumUnderlyingType() ?? type).SpecialType);
Binder\Binder_Operators.cs (2)
1731TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!; 2818var underlyingType = operand.Type.GetEnumUnderlyingType()!;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
474var underlying = enumType.GetEnumUnderlyingType();
CodeGen\EmitOperators.cs (3)
678SpecialType type = enumType.GetEnumUnderlyingType().SpecialType; 786return IsUnsigned(Binder.GetEnumPromotedType(op.Left.Type.GetEnumUnderlyingType().SpecialType)); 789return IsUnsigned(Binder.GetEnumPromotedType(op.Right.Type.GetEnumUnderlyingType().SpecialType));
Compilation\CSharpCompilation.cs (3)
4358csharpRightType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType && 4365csharpLeftType.SpecialType == csharpRightType.GetEnumUnderlyingType()?.SpecialType && 4374csharpReturnType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType &&
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
510var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType()); 1188var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType());
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (8)
500var underlyingTypeFrom = rewrittenOperand.Type.GetEnumUnderlyingType()!; 511var underlyingTypeTo = rewrittenType.GetEnumUnderlyingType()!; 1115typeFromUnderlying = typeFrom.GetEnumUnderlyingType()!; 1123typeToUnderlying = typeTo.GetEnumUnderlyingType()!; 1543SpecialType t0Type = t0.IsEnumType() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType; 1544SpecialType s0Type = s0.IsEnumType() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType; 1820var underlying = toType.GetEnumUnderlyingType(); 1833var underlying = fromType.GetEnumUnderlyingType();
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
132var underlyingType = loweredOperand.Type.GetEnumUnderlyingType(); 1025underlyingType = underlyingType.GetEnumUnderlyingType();
Symbols\Attributes\SourceAttributeData.cs (1)
310specType = parameterType.GetEnumUnderlyingType()!.SpecialType;
Symbols\Metadata\PE\SymbolFactory.cs (1)
56return type.GetEnumUnderlyingType();
Symbols\TypeSymbolExtensions.cs (3)
186return type.GetEnumUnderlyingType() ?? type; 227var underlyingType = type.GetEnumUnderlyingType(); 291type = type.GetEnumUnderlyingType()!;