3 instantiations of TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Tuples\TupleTypeSymbol.vb (3)
342Me.New(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 431Return New TupleTypeSymbol(locations, tupleCompatibleType, elementLocations, elementNames, elementTypes, errorPositions) 503Return New TupleTypeSymbol(CType(Nothing, Location), Me._underlyingType, Nothing, newElementNames, Me._elementTypes, Nothing)
93 references to TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (93)
Symbols\ConstraintsHelper.vb (4)
447tuple As TupleTypeSymbol, 463TupleTypeSymbol.GetUnderlyingTypeChain(type, underlyingTupleTypeChain) 481Dim location = If(ordinal = TupleTypeSymbol.RestIndex, syntaxNode.Location, elementLocations(ordinal + offset)) 487offset += TupleTypeSymbol.RestIndex
Symbols\InstanceErrorTypeSymbol.vb (1)
157Dim otherTuple = TryCast(other, TupleTypeSymbol)
Symbols\InstanceTypeSymbol.vb (1)
144Dim otherTuple = TryCast(other, TupleTypeSymbol)
Symbols\Metadata\PE\TupleTypeDecoder.vb (2)
24''' a <see cref="TupleTypeSymbol"/> with attached names. 217decodedType = TupleTypeSymbol.Create(decodedType, elementNames)
Symbols\NamedTypeSymbol.vb (9)
1527Name = TupleTypeSymbol.TupleTypeName AndAlso 1532If arity > 0 AndAlso arity < TupleTypeSymbol.RestPosition Then 1535ElseIf arity = TupleTypeSymbol.RestPosition AndAlso Not IsDefinition Then 1542typeToCheck = DirectCast(typeToCheck, NamedTypeSymbol).TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1) 1547If underlying.Arity = TupleTypeSymbol.RestPosition AndAlso Not TypeSymbol.Equals(underlying.OriginalDefinition, Me.OriginalDefinition, TypeCompareKind.ConsiderEverything) Then 1552tupleCardinality = (TupleTypeSymbol.RestPosition - 1) * levelsOfNesting + typeToCheck.TupleElementTypes.Length 1559arity < TupleTypeSymbol.RestPosition AndAlso 1561Debug.Assert(tupleCardinality < TupleTypeSymbol.RestPosition) 1562tupleCardinality += (TupleTypeSymbol.RestPosition - 1) * levelsOfNesting
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
158Return DirectCast(type, TupleTypeSymbol).WithUnderlyingType(newUnderlyingType)
Symbols\SubstitutedErrorType.vb (1)
263Dim otherTuple = TryCast(obj, TupleTypeSymbol)
Symbols\SubstitutedNamedType.vb (1)
535Dim otherTuple = TryCast(other, TupleTypeSymbol)
Symbols\Tuples\TupleEventSymbol.vb (2)
18Private ReadOnly _containingType As TupleTypeSymbol 80Public Sub New(container As TupleTypeSymbol, underlyingEvent As EventSymbol)
Symbols\Tuples\TupleFieldSymbol.vb (4)
18Protected ReadOnly _containingTuple As TupleTypeSymbol 86Public Sub New(container As TupleTypeSymbol, underlyingField As FieldSymbol, tupleElementIndex As Integer) 142Public Sub New(container As TupleTypeSymbol, 223Public Sub New(container As TupleTypeSymbol,
Symbols\Tuples\TupleMethodSymbol.vb (2)
18Private ReadOnly _containingType As TupleTypeSymbol 107Public Sub New(container As TupleTypeSymbol, underlyingMethod As MethodSymbol)
Symbols\Tuples\TuplePropertySymbol.vb (2)
18Private ReadOnly _containingType As TupleTypeSymbol 108Public Sub New(container As TupleTypeSymbol, underlyingProperty As PropertySymbol)
Symbols\Tuples\TupleTypeSymbol.vb (59)
374Optional diagnostics As BindingDiagnosticBag = Nothing) As TupleTypeSymbol 383Dim tupleUnderlyingType As NamedTypeSymbol = TupleTypeSymbol.GetTupleUnderlyingType(elementTypes, syntax, compilation, diagnostics) 389Dim constructedType = TupleTypeSymbol.Create(locationOpt, tupleUnderlyingType, elementLocations, elementNames, errorPositions) 397Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol) As TupleTypeSymbol 398Return TupleTypeSymbol.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, Nothing, Nothing) 401Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol, elementNames As ImmutableArray(Of String)) As TupleTypeSymbol 402Return TupleTypeSymbol.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, elementNames, errorPositions:=Nothing) 407errorPositions As ImmutableArray(Of Boolean)) As TupleTypeSymbol 409Return TupleTypeSymbol.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 415errorPositions As ImmutableArray(Of Boolean)) As TupleTypeSymbol 420If tupleCompatibleType.Arity = TupleTypeSymbol.RestPosition Then 421tupleCompatibleType = TupleTypeSymbol.EnsureRestExtensionsAreTuples(tupleCompatibleType) 422Dim tupleElementTypes As ImmutableArray(Of TypeSymbol) = tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleElementTypes 423Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(TupleTypeSymbol.RestPosition - 1 + tupleElementTypes.Length) 424instance.AddRange(tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics, TupleTypeSymbol.RestPosition - 1) 435If Not tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).IsTupleType Then 441namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1), NamedTypeSymbol) 442Loop While namedTypeSymbol.Arity = TupleTypeSymbol.RestPosition 451Dim typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers) = ArrayBuilder(Of TypeWithModifiers).GetInstance(TupleTypeSymbol.RestPosition) 453Dim extensionTuple As TupleTypeSymbol = TupleTypeSymbol.Create(CType(Nothing, Location), tupleCompatibleType, Nothing, Nothing, Nothing) 455tupleCompatibleType = TupleTypeSymbol.ReplaceRestExtensionType(tupleCompatibleType, typeArgumentsBuilder, extensionTuple) 464Private Shared Function ReplaceRestExtensionType(tupleCompatibleType As NamedTypeSymbol, typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers), extensionTuple As TupleTypeSymbol) As NamedTypeSymbol 470For i As Integer = 0 To TupleTypeSymbol.RestPosition - 1 - 1 476If(hasTypeArgumentsCustomModifiers, tupleCompatibleType.GetTypeArgumentCustomModifiers(TupleTypeSymbol.RestPosition - 1), Nothing))) 483Friend Function WithUnderlyingType(newUnderlyingType As NamedTypeSymbol) As TupleTypeSymbol 485Return TupleTypeSymbol.Create(Me._locations, newUnderlyingType, Me._elementLocations, Me._providedElementNames, Me._errorPositions) 488Friend Function WithElementNames(newElementNames As ImmutableArray(Of String)) As TupleTypeSymbol 511If namedTypeSymbol.Arity <> TupleTypeSymbol.RestPosition Then 514namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleUnderlyingType 526Dim length As Integer = Math.Min(namedTypeSymbol.Arity, TupleTypeSymbol.RestPosition - 1) 528If namedTypeSymbol.Arity <> TupleTypeSymbol.RestPosition Then 531namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1), NamedTypeSymbol) 539namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleUnderlyingType 552Dim chainLength As Integer = TupleTypeSymbol.NumberOfValueTuples(numElements, remainder) 554Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(remainder)) 560Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (TupleTypeSymbol.RestPosition - 1), remainder)) 563Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(TupleTypeSymbol.RestPosition)) 569Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (TupleTypeSymbol.RestPosition - 1), TupleTypeSymbol.RestPosition - 1).Add(namedTypeSymbol) 580Dim num As Integer = TupleTypeSymbol.NumberOfValueTuples(cardinality, arity) 581Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(arity)) 585Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(TupleTypeSymbol.RestPosition)) 591If arity > TupleTypeSymbol.RestPosition Then 595Return TupleTypeSymbol.tupleTypes(arity - 1) 599If arity > TupleTypeSymbol.RestPosition Then 603Return TupleTypeSymbol.tupleCtors(arity - 1) 607Return TupleTypeSymbol.tupleMembers(arity - 1)(position - 1) 624If TupleTypeSymbol.IsElementNameForbidden(name) Then 632If num > 0 AndAlso IdentifierComparison.Equals(name, TupleTypeSymbol.TupleMemberName(num)) Then 651Dim wellKnownMemberInType As Symbol = TupleTypeSymbol.GetWellKnownMemberInType(type, relativeMember) 881Dim num As Integer = Math.Min(underlying.Arity, TupleTypeSymbol.RestPosition - 1) 883Dim tupleTypeMember As WellKnownMember = TupleTypeSymbol.GetTupleTypeMember(underlying.Arity, i + 1) 884fieldsForElements.Add(CType(TupleTypeSymbol.GetWellKnownMemberInType(underlying, tupleTypeMember), FieldSymbol)) 985Dim otherTuple = TryCast(obj, TupleTypeSymbol) 1066result = TupleTypeSymbol.Create(CType(target, NamedTypeSymbol)) 1079Dim tupleType = TupleTypeSymbol.Create(Me._locations, substitutedUnderlying, Me._elementLocations,
Symbols\TypeSymbolExtensions.vb (4)
67elementTypes = DirectCast(type, TupleTypeSymbol).TupleElementTypes 86TupleTypeSymbol.AddElementTypes(DirectCast(type, NamedTypeSymbol), elementTypesBuilder) 97Return DirectCast(Type, TupleTypeSymbol).TupleElementTypes 110TupleTypeSymbol.AddElementTypes(DirectCast(Type, NamedTypeSymbol), elementTypesBuilder)