31 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Patterns.cs (5)
88
Debug.Assert(inputUnionType.
IsUnionType
);
236
Debug.Assert(inputUnionType.
IsUnionType
);
410
Debug.Assert(unionType.
IsUnionType
);
1366
Debug.Assert(unionType is null || unionType.
IsUnionType
);
2308
inputType is NamedTypeSymbol {
IsUnionType
: true } inputUnionType &&
Binder\DecisionDagBuilder.cs (4)
479
propertyInput.Type is NamedTypeSymbol {
IsUnionType
: true } match &&
672
tryGetValueInput.Type is NamedTypeSymbol {
IsUnionType
: true } match)
731
propertyInput.Type is NamedTypeSymbol {
IsUnionType
: true } match &&
1003
if ((receiver is null ? input.Type : receiver.Type.StrippedType()) is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Binder\PatternExplainer.cs (1)
708
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)
271
if (!conversion.IsUnion && !(caseExpression.IsLiteralNull() && SwitchGoverningType.StrippedType() is NamedTypeSymbol {
IsUnionType
: true }))
CodeGen\EmitExpression.cs (1)
1685
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 &&
4474
type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
8026
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
8516
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
9617
Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true });
10724
targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true } unionType &&
12326
receiverType.Type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Symbols\NamedTypeSymbol.cs (4)
1892
if (!
IsUnionType
)
1920
Debug.Assert(
IsUnionType
);
2015
Debug.Assert(unionType.
IsUnionType
);
2035
Debug.Assert(
IsUnionType
);
Symbols\PublicModel\TypeSymbol.cs (1)
205
bool ITypeSymbol.IsUnion => UnderlyingTypeSymbol is Symbols.NamedTypeSymbol {
IsUnionType
: true };
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2083
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 });