32 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Patterns.cs (6)
38
Debug.Assert(inputUnionType.
IsUnionType
);
165
Debug.Assert(inputUnionType.
IsUnionType
);
225
Debug.Assert(inputUnionType.
IsUnionType
);
377
Debug.Assert(unionType.
IsUnionType
);
1275
Debug.Assert(unionType is null || unionType.
IsUnionType
);
2217
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)
1181
if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol {
IsUnionType
: true } } typeExpression)
2322
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, UnionCaseTypes: not [] } unionType &&
4465
type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
7999
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
8489
receiverType is NamedTypeSymbol {
IsUnionType
: true } unionType &&
9590
Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true });
10695
targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol {
IsUnionType
: true } unionType &&
12258
receiverType.Type is NamedTypeSymbol {
IsUnionType
: true } unionType &&
Symbols\NamedTypeSymbol.cs (4)
1886
if (!
IsUnionType
)
1915
Debug.Assert(
IsUnionType
);
1956
Debug.Assert(unionType.
IsUnionType
);
1976
Debug.Assert(
IsUnionType
);
Symbols\PublicModel\TypeSymbol.cs (1)
203
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 });