61 references to ElementType
Microsoft.CodeAnalysis.CSharp (61)
Binder\Binder_Attributes.cs (1)
925
((ArrayTypeSymbol)type).
ElementType
.SpecialType == SpecialType.System_Object)
Binder\Binder_Conversions.cs (1)
580
method.Parameters[0].Type is ArrayTypeSymbol { IsSZArray: true,
ElementType
: TypeParameterSymbol });
Binder\Binder_Crefs.cs (1)
557
return ContainsNestedTypeOfUnconstructedGenericType(((ArrayTypeSymbol)type).
ElementType
);
Binder\Binder_Expressions.cs (3)
4226
TypeSymbol elemType = type.
ElementType
;
9339
return new BoundArrayAccess(node, expr, BuildArgumentsForErrorRecovery(arguments), arrayType.
ElementType
, hasErrors: true);
9367
: arrayType.
ElementType
;
Binder\Binder_Statements.cs (1)
1268
elementType = ((ArrayTypeSymbol)initializerType).
ElementType
;
Binder\DecisionDagBuilder.cs (2)
1556
TypeSymbol e1 = array1.
ElementType
.EnumUnderlyingTypeOrSelf();
1557
TypeSymbol e2 = array2.
ElementType
.EnumUnderlyingTypeOrSelf();
Binder\Semantics\AccessCheck.cs (1)
152
return IsSymbolAccessibleCore(((ArrayTypeSymbol)symbol).
ElementType
, within, null, out failedThroughTypeCheck, compilation, ref useSiteInfo, basesBeingResolved);
Binder\Semantics\Conversions\ConversionsBase.cs (4)
3743
HasExplicitReferenceConversion(sourceArray.
ElementType
, destinationArray.
ElementType
, ref useSiteInfo);
3771
if (HasExplicitReferenceConversion(sourceArray.
ElementType
, ((NamedTypeSymbol)destination).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type, ref useSiteInfo))
3792
var destinationElement = destinationArray.
ElementType
;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
2766
return MoreSpecificType(arr1.
ElementType
, arr2.
ElementType
, ref useSiteInfo);
3212
elementType = arrayType.
ElementType
;
CodeGen\EmitArrayInitializer.cs (3)
48
var initializationStyle = ShouldEmitBlockInitializer(arrayType.
ElementType
, initExprs);
480
elementType = arrayType.
ElementType
;
667
EmitSymbolToken(arrayType.
ElementType
, wrappedExpression.Syntax);
CodeGen\EmitExpression.cs (4)
2381
EmitSymbolToken(arrayType.
ElementType
, expression.Syntax);
3212
var elementType = arrayType.
ElementType
;
3979
return IsVarianceCast(((ArrayTypeSymbol)to).
ElementType
, ((ArrayTypeSymbol)from).
ElementType
);
Compilation\CSharpCompilation.cs (1)
2253
return (array.IsSZArray && array.
ElementType
.SpecialType == SpecialType.System_String, returnsTaskOrTaskOfInt);
Compiler\ClsComplianceChecker.cs (4)
986
return IsCompliantType(((ArrayTypeSymbol)type).
ElementType
, context);
1385
bool elementTypesDiffer = !TypeSymbol.Equals(xArrayType.
ElementType
, yArrayType.
ElementType
, TypeCompareKind.ConsiderEverything2);
1420
return arrayType.
ElementType
.Kind == SymbolKind.ArrayType;
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
44
Visit(symbol.
ElementType
, builder);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (4)
149
var otherElementType = (TypeSymbol?)Visit(symbol.
ElementType
);
573
AreTypesEqual(type.
ElementType
, other.
ElementType
);
861
var translatedElementType = (TypeSymbol)this.Visit(symbol.
ElementType
);
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
55
factory.Array(payloadArrayType.
ElementType
, factory.Binary(BinaryOperatorKind.Addition, factory.SpecialType(SpecialType.System_Int32), factory.MaximumMethodDefIndex(), factory.Literal(1))));
FlowAnalysis\DefiniteAssignment.cs (2)
906
type is not ArrayTypeSymbol { IsSZArray: true,
ElementType
.SpecialType: SpecialType.System_Byte })
2635
MarkFieldsUsed(((ArrayTypeSymbol)type).
ElementType
);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
340
var boundType = _bound.Typeof(arrayType.
ElementType
, _bound.WellKnownType(WellKnownType.System_Type));
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
1134
optimized = CreateArrayEmptyCallIfAvailable(possibleParamsArray.Syntax, ((ArrayTypeSymbol)possibleParamsArray.Type!).
ElementType
);
1400
BoundExpression? arrayEmpty = CreateArrayEmptyCallIfAvailable(syntax, arrayType.
ElementType
);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
793
var elementType = ((ArrayTypeSymbol)arrayTemp.Type).
ElementType
;
861
var spanOfElementType = spanCtorArray.ContainingType.Construct(arrayType.
ElementType
);
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
762
return (type as ArrayTypeSymbol)?.
ElementType
.IsSealed == true;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
145
Debug.Assert(byteArray.
ElementType
.SpecialType == SpecialType.System_Byte);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (2)
945
type: arrayType.
ElementType
));
1124
type: arrayType.
ElementType
));
Lowering\SyntheticBoundNodeFactory.cs (1)
1180
return new BoundArrayAccess(Syntax, array, indices, ((ArrayTypeSymbol)array.Type).
ElementType
);
Symbols\ArrayTypeSymbol.cs (2)
380
current = cur.
ElementType
;
500
ITypeSymbolInternal IArrayTypeSymbolInternal.ElementType =>
ElementType
;
Symbols\Attributes\SourceAttributeData.cs (1)
320
specType = ((ArrayTypeSymbol)parameterType).
ElementType
.SpecialType;
Symbols\Compilation_WellKnownMembers.cs (2)
1082
return array.
ElementType
;
1167
return array.
ElementType
;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
312
TypeSymbol transformedElementType = TransformType(arrayType.
ElementType
);
318
return TypeSymbol.Equals(transformedElementType, arrayType.
ElementType
, TypeCompareKind.ConsiderEverything2) ?
Symbols\Metadata\PE\MetadataDecoder.cs (1)
222
return IsOrClosedOverATypeFromAssemblies(((ArrayTypeSymbol)symbol).
ElementType
, assemblies);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
651
return IsOrClosedOverAnExplicitLocalType(((ArrayTypeSymbol)symbol).
ElementType
);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1441
static (m, systemType) => m is FieldSymbol { Type: ArrayTypeSymbol {
ElementType
: NamedTypeSymbol elementType } } && elementType.Equals(systemType, TypeCompareKind.ConsiderEverything),
Symbols\SymbolDistinguisher.cs (1)
153
symbol = ((ArrayTypeSymbol)symbol).
ElementType
;
Symbols\TypeSymbolExtensions.cs (1)
276
type = arrayType.
ElementType
;
Symbols\TypeUnification.cs (1)
270
return Contains(((ArrayTypeSymbol)type).
ElementType
, typeParam);
Symbols\VarianceSafety.cs (1)
332
return IsVarianceUnsafe(((ArrayTypeSymbol)type).
ElementType
, requireOutputSafety, requireInputSafety, context, locationProvider, locationArg, diagnostics);