26 references to EnumUnderlyingTypeOrSelf
Microsoft.CodeAnalysis.CSharp (20)
Binder\Binder_Patterns.cs (1)
1632
BinaryOperatorKind opType = RelationalOperatorType(value.Type.
EnumUnderlyingTypeOrSelf
());
Binder\DecisionDagBuilder.cs (2)
1507
TypeSymbol e1 = array1.ElementType.
EnumUnderlyingTypeOrSelf
();
1508
TypeSymbol e2 = array2.ElementType.
EnumUnderlyingTypeOrSelf
();
Binder\PatternExplainer.cs (2)
672
var underlyingType = type.
EnumUnderlyingTypeOrSelf
();
695
string valueString = PrimitiveValueString(value, type.
EnumUnderlyingTypeOrSelf
());
CodeGen\EmitArrayInitializer.cs (4)
224
TypeSymbol type = init.Type.
EnumUnderlyingTypeOrSelf
();
258
elementType = elementType.
EnumUnderlyingTypeOrSelf
();
473
specialElementType = elementType.
EnumUnderlyingTypeOrSelf
().SpecialType;
663
arrayType = arrayType.WithElementType(TypeWithAnnotations.Create(elementType.
EnumUnderlyingTypeOrSelf
()));
CodeGen\EmitStackAllocInitializer.cs (3)
50
else if (elementType.
EnumUnderlyingTypeOrSelf
().SpecialType.SizeInBytes() == 1)
79
if (elementType.
EnumUnderlyingTypeOrSelf
().SpecialType.IsBlittable())
126
int elementTypeSizeInBytes = elementType.
EnumUnderlyingTypeOrSelf
().SpecialType.SizeInBytes();
CodeGen\EmitStatement.cs (1)
1299
_builder.EmitIntegerSwitchJumpTable(switchCaseLabels, fallThroughLabel, key, expression.Type.
EnumUnderlyingTypeOrSelf
().PrimitiveTypeCode);
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
213
null => variableType.
EnumUnderlyingTypeOrSelf
().SpecialType switch
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
394
TypeSymbol comparisonType = input.Type.
EnumUnderlyingTypeOrSelf
();
411
TypeSymbol comparisonType = input.Type.
EnumUnderlyingTypeOrSelf
();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
621
type.StrippedType().
EnumUnderlyingTypeOrSelf
().SpecialType;
Symbols\TypeSymbolExtensions.cs (2)
578
type = type.
EnumUnderlyingTypeOrSelf
();
1252
type = type.
EnumUnderlyingTypeOrSelf
();
Utilities\ValueSetFactory.cs (1)
60
type = type.
EnumUnderlyingTypeOrSelf
();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\OperatorTests.cs (6)
7566
underlying = type.
EnumUnderlyingTypeOrSelf
();
8233
(result = OverloadResolution.BinopEasyOut.OpKind(op, leftType.
EnumUnderlyingTypeOrSelf
(), rightType)) != BinaryOperatorKind.Error &&
8234
TypeSymbol.Equals((signature = compilation.builtInOperators.GetSignature(result)).RightType, leftType.
EnumUnderlyingTypeOrSelf
(), TypeCompareKind.ConsiderEverything2))
8240
(result = OverloadResolution.BinopEasyOut.OpKind(op, leftType, rightType.
EnumUnderlyingTypeOrSelf
())) != BinaryOperatorKind.Error &&
8241
TypeSymbol.Equals((signature = compilation.builtInOperators.GetSignature(result)).LeftType, rightType.
EnumUnderlyingTypeOrSelf
(), TypeCompareKind.ConsiderEverything2))
8248
signature = new BinaryOperatorSignature(op | BinaryOperatorKind.Enum, leftType, rightType, leftType.
EnumUnderlyingTypeOrSelf
());