Base:
property
IsTupleType
Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol.IsTupleType
71 references to IsTupleType
Microsoft.CodeAnalysis.CSharp (49)
Binder\Binder_Conversions.cs (2)
2461
if (targetType.
IsTupleType
)
2471
if (sourceTuple.Type is NamedTypeSymbol {
IsTupleType
: true } sourceType)
Emitter\Model\PEModuleBuilder.cs (1)
970
else if (namedTypeSymbol.
IsTupleType
)
FlowAnalysis\NullableWalker.cs (6)
3767
(FieldSymbol { ContainingType: {
IsTupleType
: true }, TupleElementIndex: var oi } originalField, FieldSymbol { ContainingType: {
IsTupleType
: true }, TupleElementIndex: var ui } updatedField) =>
4196
if (containingType?.
IsTupleType
== true && !isDefaultValueTypeConstructor)
8966
Debug.Assert(tupleType.
IsTupleType
);
9036
if (valueTuple is null || !valueTuple.
IsTupleType
)
10936
if (expr.Type is NamedTypeSymbol {
IsTupleType
: true } tupleType)
Lowering\LocalRewriter\LocalRewriter_Field.cs (1)
26
if (fieldSymbol.ContainingType.
IsTupleType
)
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
45
Debug.Assert(type.
IsTupleType
);
Symbols\ConstraintsHelper.cs (1)
612
Debug.Assert(tuple.
IsTupleType
);
Symbols\ErrorTypeSymbol.cs (1)
150
if (
IsTupleType
)
Symbols\FieldSymbol.cs (2)
438
return ContainingType.
IsTupleType
? this : null;
474
if (!ContainingType.
IsTupleType
)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1626
if (
IsTupleType
)
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
290
if (decodedType.
IsTupleType
)
Symbols\NamedTypeSymbol.cs (3)
907
if (this.
IsTupleType
&& !tupleNamesEquals(other, comparison))
1033
return
IsTupleType
? MergeTupleNames((NamedTypeSymbol)other, result) : result;
1053
bool isTuple = typeA.
IsTupleType
;
Symbols\Source\SourceMemberContainerSymbol.cs (3)
1278
return (
IsTupleType
|| IsRecord || IsRecordStruct || this.declaration.ContainsExtensionDeclarations) ? GetMembers().Select(m => m.Name) : this.declaration.MemberNames;
3168
if (!membersAndInitializers.HaveIndexers && !this.
IsTupleType
&& _lazyEarlyAttributeDecodingMembersDictionary is object)
5513
if (!this.
IsTupleType
)
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
540
if (namedType.
IsTupleType
)
Symbols\SubstitutedFieldSymbol.cs (1)
66
if (this.ContainingType.
IsTupleType
&& this.IsDefaultTupleElement)
Symbols\SubstitutedNamedTypeSymbol.cs (3)
200
if (
IsTupleType
)
273
if (
IsTupleType
)
335
if (
IsTupleType
)
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
195
Debug.Assert(newOwner.
IsTupleType
&& newOwner.TupleElementTypesWithAnnotations.Length > TupleElementIndex);
Symbols\Tuples\TupleFieldSymbol.cs (6)
54
Debug.Assert(container.
IsTupleType
);
109
if (!originalContainer.
IsTupleType
)
211
Debug.Assert(newOwner.
IsTupleType
);
267
Debug.Assert(container.
IsTupleType
);
268
Debug.Assert(underlyingField.ContainingType.
IsTupleType
);
332
Debug.Assert(newOwner.
IsTupleType
);
Symbols\Tuples\TupleTypeSymbol.cs (11)
106
Debug.Assert(tupleCompatibleType.
IsTupleType
);
112
if (!
IsTupleType
|| (original._lazyTupleData == null && this._lazyTupleData == null) || TupleData!.EqualsIgnoringTupleUnderlyingType(original.TupleData))
121
=> this._lazyTupleData != null ? this.TupleData!.TupleUnderlyingType : (this.
IsTupleType
? this : null);
165
Debug.Assert(
IsTupleType
);
172
Debug.Assert(
IsTupleType
);
535
if (!
IsTupleType
)
559
=>
IsTupleType
? TupleData!.TupleElementTypesWithAnnotations(this) : default;
562
=>
IsTupleType
? TupleData!.TupleElements(this) : default;
566
return
IsTupleType
? TupleData!.GetTupleMemberSymbolForUnderlyingMember(underlyingMemberOpt) : null;
571
Debug.Assert(
IsTupleType
);
922
Debug.Assert(underlyingType.
IsTupleType
);
Symbols\TypeUnification.cs (1)
279
var typeParts = namedType.
IsTupleType
? namedType.TupleElementTypesWithAnnotations : namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (2)
139
if (
IsTupleType
)
152
if (
IsTupleType
)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (22)
CodeGen\CodeGenTupleTest.cs (22)
3349
Assert.True(mTuple.
IsTupleType
);
4476
Assert.True(vt2.
IsTupleType
);
4504
Assert.True(unnamedTuple.
IsTupleType
);
4515
Assert.True(namedTuple.
IsTupleType
);
5831
Assert.False(vt8.
IsTupleType
);
6035
Assert.False(vt8.OriginalDefinition.
IsTupleType
);
6936
Assert.False(stringType.
IsTupleType
);
11156
Assert.True(m1Tuple.
IsTupleType
);
11420
Assert.True(m1Tuple.
IsTupleType
);
11810
Assert.True(m3TupleRestTuple.
IsTupleType
);
12738
Assert.True(m1Tuple.
IsTupleType
);
13450
Assert.True(sym.ContainingType.
IsTupleType
);
13459
Assert.True(sym.ContainingType.
IsTupleType
);
13468
Assert.True(sym.ContainingType.
IsTupleType
);
13936
Assert.True(m1Tuple.
IsTupleType
);
14100
Assert.True(m1Tuple.
IsTupleType
);
26900
Assert.True(tuple.
IsTupleType
);
26967
Assert.True(tuple1.
IsTupleType
);
26983
Assert.True(tuple2.
IsTupleType
);
28250
Assert.True(namedType.
IsTupleType
);
28332
Assert.False(namedType.
IsTupleType
);
28420
Assert.True(namedType.
IsTupleType
);