3 instantiations of TupleTypeSymbol
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\Tuples\TupleTypeSymbol.vb (3)
336Me.New(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 425Return New TupleTypeSymbol(locations, tupleCompatibleType, elementLocations, elementNames, elementTypes, errorPositions) 497Return 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)
1525Name = TupleTypeSymbol.TupleTypeName AndAlso 1530If arity > 0 AndAlso arity < TupleTypeSymbol.RestPosition Then 1533ElseIf arity = TupleTypeSymbol.RestPosition AndAlso Not IsDefinition Then 1540typeToCheck = DirectCast(typeToCheck, NamedTypeSymbol).TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1) 1545If underlying.Arity = TupleTypeSymbol.RestPosition AndAlso Not TypeSymbol.Equals(underlying.OriginalDefinition, Me.OriginalDefinition, TypeCompareKind.ConsiderEverything) Then 1550tupleCardinality = (TupleTypeSymbol.RestPosition - 1) * levelsOfNesting + typeToCheck.TupleElementTypes.Length 1557arity < TupleTypeSymbol.RestPosition AndAlso 1559Debug.Assert(tupleCardinality < TupleTypeSymbol.RestPosition) 1560tupleCardinality += (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)
529Dim 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 104Public Sub New(container As TupleTypeSymbol, underlyingProperty As PropertySymbol)
Symbols\Tuples\TupleTypeSymbol.vb (59)
368Optional diagnostics As BindingDiagnosticBag = Nothing) As TupleTypeSymbol 377Dim tupleUnderlyingType As NamedTypeSymbol = TupleTypeSymbol.GetTupleUnderlyingType(elementTypes, syntax, compilation, diagnostics) 383Dim constructedType = TupleTypeSymbol.Create(locationOpt, tupleUnderlyingType, elementLocations, elementNames, errorPositions) 391Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol) As TupleTypeSymbol 392Return TupleTypeSymbol.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, Nothing, Nothing) 395Public Shared Function Create(tupleCompatibleType As NamedTypeSymbol, elementNames As ImmutableArray(Of String)) As TupleTypeSymbol 396Return TupleTypeSymbol.Create(ImmutableArray(Of Location).Empty, tupleCompatibleType, Nothing, elementNames, errorPositions:=Nothing) 401errorPositions As ImmutableArray(Of Boolean)) As TupleTypeSymbol 403Return TupleTypeSymbol.Create(If((locationOpt Is Nothing), ImmutableArray(Of Location).Empty, ImmutableArray.Create(Of Location)(locationOpt)), 409errorPositions As ImmutableArray(Of Boolean)) As TupleTypeSymbol 414If tupleCompatibleType.Arity = TupleTypeSymbol.RestPosition Then 415tupleCompatibleType = TupleTypeSymbol.EnsureRestExtensionsAreTuples(tupleCompatibleType) 416Dim tupleElementTypes As ImmutableArray(Of TypeSymbol) = tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleElementTypes 417Dim instance As ArrayBuilder(Of TypeSymbol) = ArrayBuilder(Of TypeSymbol).GetInstance(TupleTypeSymbol.RestPosition - 1 + tupleElementTypes.Length) 418instance.AddRange(tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics, TupleTypeSymbol.RestPosition - 1) 429If Not tupleCompatibleType.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).IsTupleType Then 435namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1), NamedTypeSymbol) 436Loop While namedTypeSymbol.Arity = TupleTypeSymbol.RestPosition 445Dim typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers) = ArrayBuilder(Of TypeWithModifiers).GetInstance(TupleTypeSymbol.RestPosition) 447Dim extensionTuple As TupleTypeSymbol = TupleTypeSymbol.Create(CType(Nothing, Location), tupleCompatibleType, Nothing, Nothing, Nothing) 449tupleCompatibleType = TupleTypeSymbol.ReplaceRestExtensionType(tupleCompatibleType, typeArgumentsBuilder, extensionTuple) 458Private Shared Function ReplaceRestExtensionType(tupleCompatibleType As NamedTypeSymbol, typeArgumentsBuilder As ArrayBuilder(Of TypeWithModifiers), extensionTuple As TupleTypeSymbol) As NamedTypeSymbol 464For i As Integer = 0 To TupleTypeSymbol.RestPosition - 1 - 1 470If(hasTypeArgumentsCustomModifiers, tupleCompatibleType.GetTypeArgumentCustomModifiers(TupleTypeSymbol.RestPosition - 1), Nothing))) 477Friend Function WithUnderlyingType(newUnderlyingType As NamedTypeSymbol) As TupleTypeSymbol 479Return TupleTypeSymbol.Create(Me._locations, newUnderlyingType, Me._elementLocations, Me._providedElementNames, Me._errorPositions) 482Friend Function WithElementNames(newElementNames As ImmutableArray(Of String)) As TupleTypeSymbol 505If namedTypeSymbol.Arity <> TupleTypeSymbol.RestPosition Then 508namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleUnderlyingType 520Dim length As Integer = Math.Min(namedTypeSymbol.Arity, TupleTypeSymbol.RestPosition - 1) 522If namedTypeSymbol.Arity <> TupleTypeSymbol.RestPosition Then 525namedTypeSymbol = CType(namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1), NamedTypeSymbol) 533namedTypeSymbol = namedTypeSymbol.TypeArgumentsNoUseSiteDiagnostics(TupleTypeSymbol.RestPosition - 1).TupleUnderlyingType 546Dim chainLength As Integer = TupleTypeSymbol.NumberOfValueTuples(numElements, remainder) 548Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(remainder)) 554Dim namedTypeSymbol As NamedTypeSymbol = wellKnownType.Construct(ImmutableArray.Create(Of TypeSymbol)(elementTypes, (chainLength - 1) * (TupleTypeSymbol.RestPosition - 1), remainder)) 557Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(TupleTypeSymbol.RestPosition)) 563Dim typeArguments As ImmutableArray(Of TypeSymbol) = ImmutableArray.Create(Of TypeSymbol)(elementTypes, ([loop] - 1) * (TupleTypeSymbol.RestPosition - 1), TupleTypeSymbol.RestPosition - 1).Add(namedTypeSymbol) 574Dim num As Integer = TupleTypeSymbol.NumberOfValueTuples(cardinality, arity) 575Dim wellKnownType As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(arity)) 579Dim wellKnownType2 As NamedTypeSymbol = compilation.GetWellKnownType(TupleTypeSymbol.GetTupleType(TupleTypeSymbol.RestPosition)) 585If arity > TupleTypeSymbol.RestPosition Then 589Return TupleTypeSymbol.tupleTypes(arity - 1) 593If arity > TupleTypeSymbol.RestPosition Then 597Return TupleTypeSymbol.tupleCtors(arity - 1) 601Return TupleTypeSymbol.tupleMembers(arity - 1)(position - 1) 618If TupleTypeSymbol.IsElementNameForbidden(name) Then 626If num > 0 AndAlso IdentifierComparison.Equals(name, TupleTypeSymbol.TupleMemberName(num)) Then 645Dim wellKnownMemberInType As Symbol = TupleTypeSymbol.GetWellKnownMemberInType(type, relativeMember) 875Dim num As Integer = Math.Min(underlying.Arity, TupleTypeSymbol.RestPosition - 1) 877Dim tupleTypeMember As WellKnownMember = TupleTypeSymbol.GetTupleTypeMember(underlying.Arity, i + 1) 878fieldsForElements.Add(CType(TupleTypeSymbol.GetWellKnownMemberInType(underlying, tupleTypeMember), FieldSymbol)) 979Dim otherTuple = TryCast(obj, TupleTypeSymbol) 1060result = TupleTypeSymbol.Create(CType(target, NamedTypeSymbol)) 1073Dim 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)