33 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (33)
Binder\Binder_Patterns.cs (2)
959
Debug.Assert(unionType.
IsUnionType
);
1822
inputType is NamedTypeSymbol {
IsUnionType
: true } inputUnionType &&
Binder\DecisionDagBuilder.cs (4)
487
propertyInput.Type is NamedTypeSymbol {
IsUnionType
: true } match &&
680
tryGetValueInput.Type is NamedTypeSymbol {
IsUnionType
: true } match)
739
propertyInput.Type is NamedTypeSymbol {
IsUnionType
: true } match &&
1011
if ((receiver is null ? input.Type : receiver.Type.StrippedType()) is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Binder\PatternExplainer.cs (1)
733
e.Input.Type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
994
if (target.StrippedType() is not NamedTypeSymbol namedTarget || !namedTarget.
IsUnionType
)
Binder\SwitchBinder.cs (1)
272
if (!conversion.IsUnion && !(caseExpression.IsLiteralNull() && SwitchGoverningType.StrippedType() is NamedTypeSymbol {
IsUnionType
: true }))
CodeGen\EmitExpression.cs (1)
1699
if (receiver is not BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol {
IsUnionType
: true } })
CodeGen\Optimizer.cs (2)
1183
if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol {
IsUnionType
: true } } typeExpression)
2324
if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: TypeParameterSymbol or NamedTypeSymbol {
IsUnionType
: true } } typeExpression)
FlowAnalysis\NullableWalker.cs (7)
2069
_variables[containingSlot].Symbol.GetTypeOrReturnType().Type is NamedTypeSymbol {
IsUnionType
: true, UnionCaseTypesNoUseSiteDiagnostics: not [] } unionType &&
4460
type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
8012
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
8502
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
9603
Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true });
10714
targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true } unionType &&
12316
receiverType.Type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Symbols\NamedTypeSymbol.cs (8)
1968
if (!
IsUnionType
)
2049
Debug.Assert(
IsUnionType
);
2187
Debug.Assert(unionType.
IsUnionType
);
2244
Debug.Assert(
IsUnionType
);
2370
Debug.Assert(
IsUnionType
);
2533
Debug.Assert(this.
IsUnionType
);
2703
Debug.Assert(this.
IsUnionType
);
2864
Debug.Assert(this.
IsUnionType
);
Symbols\PublicModel\TypeSymbol.cs (2)
205
bool ITypeSymbol.IsUnion => UnderlyingTypeSymbol is Symbols.NamedTypeSymbol {
IsUnionType
: true };
211
if (UnderlyingTypeSymbol is not Symbols.NamedTypeSymbol {
IsUnionType
: true } namedType)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2108
else if (
IsUnionType
)
Symbols\TypeSymbolExtensions.cs (2)
187
public bool IsSubjectForUnionMatching => patternInputType.StrippedType() is NamedTypeSymbol {
IsUnionType
: true };
191
if (patternInputType.StrippedType() is NamedTypeSymbol {
IsUnionType
: true } named)
Utilities\ValueSetFactory.UnionTypeTypeUnionValueSetFactory.cs (1)
20
Debug.Assert(unionType is NamedTypeSymbol {
IsUnionType
: true });