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