78 references to ElementTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (62)
Binder\Binder_Expressions.cs (1)
4524var elementType = arrayType.ElementTypeWithAnnotations;
Binder\ForEachLoopBinder.cs (1)
1323((ArrayTypeSymbol)collectionExprType).ElementTypeWithAnnotations;
Binder\Semantics\Conversions\ConversionsBase.cs (6)
1662elementType = arrayType.ElementTypeWithAnnotations; 2505return HasImplicitReferenceConversion(s.ElementTypeWithAnnotations, d.ElementTypeWithAnnotations, ref useSiteInfo); 2590TypeWithAnnotations elementType = source.ElementTypeWithAnnotations; 3959if (source is ArrayTypeSymbol { IsSZArray: true, ElementTypeWithAnnotations: { } elementType }) 4024if (source is ArrayTypeSymbol { IsSZArray: true, ElementTypeWithAnnotations: { } elementType } &&
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
1724ExactInference(arraySource.ElementTypeWithAnnotations, arrayTarget.ElementTypeWithAnnotations, ref useSiteInfo); 1773? arraySource.ElementTypeWithAnnotations 2089return arrayTarget.ElementTypeWithAnnotations; 2130var elementSource = arraySource.ElementTypeWithAnnotations; 2569var elementTarget = arrayTarget.ElementTypeWithAnnotations;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (8)
163var otherModifiers = VisitCustomModifiers(symbol.ElementTypeWithAnnotations.CustomModifiers); 167return ArrayTypeSymbol.CreateSZArray(_otherAssembly, symbol.ElementTypeWithAnnotations.WithTypeAndModifiers(otherElementType, otherModifiers)); 170return ArrayTypeSymbol.CreateMDArray(_otherAssembly, symbol.ElementTypeWithAnnotations.WithTypeAndModifiers(otherElementType, otherModifiers), symbol.Rank, symbol.Sizes, symbol.LowerBounds); 576Debug.Assert(type.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 577Debug.Assert(other.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 869var translatedModifiers = VisitCustomModifiers(symbol.ElementTypeWithAnnotations.CustomModifiers); 873return ArrayTypeSymbol.CreateSZArray(symbol.BaseTypeNoUseSiteDiagnostics.ContainingAssembly, symbol.ElementTypeWithAnnotations.WithTypeAndModifiers(translatedElementType, translatedModifiers)); 876return ArrayTypeSymbol.CreateMDArray(symbol.BaseTypeNoUseSiteDiagnostics.ContainingAssembly, symbol.ElementTypeWithAnnotations.WithTypeAndModifiers(translatedElementType, translatedModifiers), symbol.Rank, symbol.Sizes, symbol.LowerBounds);
Emitter\Model\ArrayTypeSymbolAdapter.cs (1)
26TypeWithAnnotations elementType = AdaptedArrayTypeSymbol.ElementTypeWithAnnotations;
FlowAnalysis\NullableWalker.cs (3)
4798ArrayTypeSymbol arrayType => arrayType.ElementTypeWithAnnotations, 5029result = type?.ElementTypeWithAnnotations ?? default; 11696currentPropertyGetterTypeWithState = arrayType.ElementTypeWithAnnotations.ToTypeWithState();
FlowAnalysis\NullableWalker_Patterns.cs (1)
857: ((ArrayTypeSymbol)inputType).ElementTypeWithAnnotations,
Lowering\LocalRewriter\LocalRewriter.cs (1)
844var elementType = ((ArrayTypeSymbol)node.Expression.Type).ElementTypeWithAnnotations;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
678var linqToArrayMethod = linqToArrayMethodGeneric.Construct([arrayType.ElementTypeWithAnnotations]);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
519TypeWithAnnotations arrayElementType = arrayType.ElementTypeWithAnnotations;
Symbols\AbstractTypeMap.cs (1)
186var oldElement = t.ElementTypeWithAnnotations;
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
211typeArgumentsBuilder.Add(((ArrayTypeSymbol)field.Type).ElementTypeWithAnnotations);
Symbols\ArrayTypeSymbol.cs (9)
100return ElementTypeWithAnnotations.IsSameAs(elementTypeWithAnnotations) ? this : WithElementTypeCore(elementTypeWithAnnotations); 357!other.ElementTypeWithAnnotations.Equals(ElementTypeWithAnnotations, comparison)) 391ElementTypeWithAnnotations.AddNullableTransforms(transforms); 396TypeWithAnnotations oldElementType = ElementTypeWithAnnotations; 411return WithElementType(transform(ElementTypeWithAnnotations)); 417TypeWithAnnotations elementType = ElementTypeWithAnnotations.MergeEquivalentTypes(((ArrayTypeSymbol)other).ElementTypeWithAnnotations, variance); 461DeriveUseSiteInfoFromType(ref result, this.ElementTypeWithAnnotations, AllowedRequiredModifierType.None);
Symbols\Compilation_WellKnownMembers.cs (1)
951HandleCustomModifiers(((ArrayTypeSymbol)type).ElementTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder);
Symbols\Metadata\PE\DynamicTypeDecoder.cs (5)
307if (!HandleCustomModifiers(arrayType.ElementTypeWithAnnotations.CustomModifiers.Length)) 321ArrayTypeSymbol.CreateSZArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.WithTypeAndModifiers(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers)) : 322ArrayTypeSymbol.CreateMDArray(_containingAssembly, arrayType.ElementTypeWithAnnotations.WithTypeAndModifiers(transformedElementType, arrayType.ElementTypeWithAnnotations.CustomModifiers), arrayType.Rank, arrayType.Sizes, arrayType.LowerBounds);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
155if (TransformTypeWithAnnotations(type.ElementTypeWithAnnotations) is { } elementType)
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
336TypeWithAnnotations decodedElementType = DecodeTypeInternal(type.ElementTypeWithAnnotations);
Symbols\PublicModel\ArrayTypeSymbol.cs (3)
49Interlocked.CompareExchange(ref _lazyElementType, _underlying.ElementTypeWithAnnotations.GetPublicSymbol(), null); 60return _underlying.ElementTypeWithAnnotations.ToPublicAnnotation(); 64ImmutableArray<CustomModifier> IArrayTypeSymbol.CustomModifiers => _underlying.ElementTypeWithAnnotations.CustomModifiers;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
697TypeWithAnnotations oldElement = type.ElementTypeWithAnnotations;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (2)
316TypeWithAnnotations elementType = array.ElementTypeWithAnnotations; 727appendTypeWithAnnotation(array.ElementTypeWithAnnotations, builder);
Symbols\TypeSymbolExtensions.cs (2)
924next = ((ArrayTypeSymbol)current).ElementTypeWithAnnotations; 2022var elementType = arrayType.ElementTypeWithAnnotations;
Symbols\TypeUnification.cs (2)
126return CanUnifyHelper(at1.ElementTypeWithAnnotations, at2.ElementTypeWithAnnotations, ref substitution);
Symbols\TypeWithAnnotations.cs (1)
657typeWithAnnotations = ((ArrayTypeSymbol)type).ElementTypeWithAnnotations;
Utilities\TypeSymbolExtensions.cs (2)
34return customModifierCountForTypeWithAnnotations(array.ElementTypeWithAnnotations); 100TypeWithAnnotations elementType = array.ElementTypeWithAnnotations;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\SymbolMatcherTests.cs (2)
195Assert.Equal(1, ((ArrayTypeSymbol)member1.ReturnType).ElementTypeWithAnnotations.CustomModifiers.Length); 202Assert.Equal(1, ((ArrayTypeSymbol)other.ReturnType).ElementTypeWithAnnotations.CustomModifiers.Length);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\NullableReferenceTypesTests.cs (4)
139520Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)c2Goo.Parameters[0].Type).ElementTypeWithAnnotations.NullableAnnotation); 139608Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)c2Goo.ReturnType).ElementTypeWithAnnotations.NullableAnnotation); 139686Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)dGoo.Parameters[0].Type).ElementTypeWithAnnotations.NullableAnnotation); 139759Assert.Equal(NullableAnnotation.Annotated, ((ArrayTypeSymbol)dGoo.ReturnType).ElementTypeWithAnnotations.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (9)
Symbols\Metadata\PE\LoadCustomModifiers.cs (3)
92Assert.Equal(1, p5Type.ElementTypeWithAnnotations.CustomModifiers.Length); 93var p5TypeMod = p5Type.ElementTypeWithAnnotations.CustomModifiers[0]; 170var arrayPropertyTypeCustomModifiers = arrayPropertyType.ElementTypeWithAnnotations.CustomModifiers.Single();
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
101Assert.Equal(1, p5Type.ElementTypeWithAnnotations.CustomModifiers.Length); 102var p5TypeMod = p5Type.ElementTypeWithAnnotations.CustomModifiers[0];
Symbols\Source\CustomModifierCopyTests.cs (3)
450CheckCustomModifier(inReturnType, ((ArrayTypeSymbol)method.ReturnType).ElementTypeWithAnnotations.CustomModifiers); 455CheckCustomModifier(inParameterType, ((ArrayTypeSymbol)method.Parameters.Single().Type).ElementTypeWithAnnotations.CustomModifiers); 468CheckCustomModifier(inType, ((ArrayTypeSymbol)property.Type).ElementTypeWithAnnotations.CustomModifiers);
Symbols\Source\ModifierTests.cs (1)
172Assert.Equal(customModifiers, substitutedArrayType.ElementTypeWithAnnotations.CustomModifiers);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
184return UsesIsNullable(((ArrayTypeSymbol)type).ElementTypeWithAnnotations, inProgress);