43 references to ValueTupleRestPosition
Microsoft.CodeAnalysis.CSharp (43)
FlowAnalysis\NullableWalker.cs (4)
8469Debug.Assert(values.Length == (useRestField ? Math.Min(tupleType.TupleElements.Length, NamedTypeSymbol.ValueTupleRestPosition) : tupleType.TupleElements.Length)); 8477n = Math.Min(n, NamedTypeSymbol.ValueTupleRestPosition - 1); 8485values.Length == NamedTypeSymbol.ValueTupleRestPosition && 8488var argOrdinal = getArgumentOrdinalFromParameterOrdinal(NamedTypeSymbol.ValueTupleRestPosition - 1);
Lowering\LocalRewriter\LocalRewriter_Field.cs (3)
74WellKnownMember wellKnownTupleRest = NamedTypeSymbol.GetTupleTypeMember(NamedTypeSymbol.ValueTupleRestPosition, NamedTypeSymbol.ValueTupleRestPosition); 89currentLinkType = (NamedTypeSymbol)currentLinkType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[NamedTypeSymbol.ValueTupleRestPosition - 1].Type;
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (4)
55underlyingTupleTypeChain.Count * (NamedTypeSymbol.ValueTupleRestPosition - 1), 75NamedTypeSymbol.GetTupleCtor(NamedTypeSymbol.ValueTupleRestPosition), 89(underlyingTupleTypeChain.Count - 1) * (NamedTypeSymbol.ValueTupleRestPosition - 1), 90NamedTypeSymbol.ValueTupleRestPosition - 1)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
497while (currentUnderlying.Arity == NamedTypeSymbol.ValueTupleRestPosition) 499tupleSymbol = (INamedTypeSymbol)currentUnderlying.TypeArguments[NamedTypeSymbol.ValueTupleRestPosition - 1];
Symbols\FieldSymbol.cs (1)
491Debug.Assert(tupleElementPosition < NamedTypeSymbol.ValueTupleRestPosition);
Symbols\NamedTypeSymbol.cs (6)
1646if (arity >= 0 && arity < ValueTupleRestPosition) 1651else if (arity == ValueTupleRestPosition && !IsDefinition) 1660typeToCheck = ((NamedTypeSymbol)typeToCheck).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[ValueTupleRestPosition - 1].Type; 1666if (arity > 0 && arity < ValueTupleRestPosition && ((NamedTypeSymbol)typeToCheck).IsTupleTypeOfCardinality(out tupleCardinality)) 1668Debug.Assert(tupleCardinality < ValueTupleRestPosition); 1669tupleCardinality += (ValueTupleRestPosition - 1) * levelsOfNesting;
Symbols\Tuples\TupleTypeSymbol.cs (23)
21internal const int ValueTupleRestIndex = ValueTupleRestPosition - 1; 89chainedTupleType = compilation.GetWellKnownType(GetTupleType(ValueTupleRestPosition)); 134if (Arity < NamedTypeSymbol.ValueTupleRestPosition) 147while (underlyingType.Arity >= NamedTypeSymbol.ValueTupleRestPosition); 211if (currentType.Arity == NamedTypeSymbol.ValueTupleRestPosition) 213currentType = (NamedTypeSymbol)currentType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[NamedTypeSymbol.ValueTupleRestPosition - 1].Type; 228remainder = (numElements - 1) % (ValueTupleRestPosition - 1) + 1; 229return (numElements - 1) / (ValueTupleRestPosition - 1) + 1; 234Debug.Assert(chainedTupleTypeOpt is null == elementTypes.Length < ValueTupleRestPosition); 240NamedTypeSymbol currentSymbol = firstTupleType.Construct(ImmutableArray.Create(elementTypes, (chainLength - 1) * (ValueTupleRestPosition - 1), remainder)); 244var chainedTypes = ImmutableArray.Create(elementTypes, (loop - 1) * (ValueTupleRestPosition - 1), ValueTupleRestPosition - 1).Add(TypeWithAnnotations.Create(currentSymbol)); 273NamedTypeSymbol chainedTupleType = compilation.GetWellKnownType(GetTupleType(ValueTupleRestPosition)); 312if (arity > ValueTupleRestPosition) 618tupleFieldIndex += (ValueTupleRestPosition - 1) * currentNestingLevel; 706if (currentValueTuple.Arity != ValueTupleRestPosition) 715if (currentValueTuple.Arity != ValueTupleRestPosition) 793found = (NamedTypeSymbol)found.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[ValueTupleRestPosition - 1].Type; 801int fieldsPerType = Math.Min(arity, ValueTupleRestPosition - 1); 982if (tuple.Arity == ValueTupleRestPosition) 985var extensionTupleElementTypes = tuple.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[ValueTupleRestPosition - 1].Type.TupleElementTypesWithAnnotations; 986var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(ValueTupleRestPosition - 1 + extensionTupleElementTypes.Length); 987typesBuilder.AddRange(tuple.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics, ValueTupleRestPosition - 1);