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