32 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Patterns.cs (6)
38Debug.Assert(inputUnionType.IsUnionType); 165Debug.Assert(inputUnionType.IsUnionType); 225Debug.Assert(inputUnionType.IsUnionType); 377Debug.Assert(unionType.IsUnionType); 1275Debug.Assert(unionType is null || unionType.IsUnionType); 2217inputType is NamedTypeSymbol { IsUnionType: true } inputUnionType &&
Binder\DecisionDagBuilder.cs (4)
479propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 672tryGetValueInput.Type is NamedTypeSymbol { IsUnionType: true } match) 731propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 1003if ((receiver is null ? input.Type : receiver.Type.StrippedType()) is NamedTypeSymbol { IsUnionType: true } unionType &&
Binder\PatternExplainer.cs (1)
708e.Input.Type is NamedTypeSymbol { IsUnionType: true } unionType &&
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
994if (target.StrippedType() is not NamedTypeSymbol namedTarget || !namedTarget.IsUnionType)
Binder\SwitchBinder.cs (1)
271if (!conversion.IsUnion && !(caseExpression.IsLiteralNull() && SwitchGoverningType.StrippedType() is NamedTypeSymbol { IsUnionType: true }))
CodeGen\EmitExpression.cs (1)
1685if (receiver is not BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol { IsUnionType: true } })
CodeGen\Optimizer.cs (2)
1181if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol { IsUnionType: true } } typeExpression) 2322if (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 && 4465type is NamedTypeSymbol { IsUnionType: true } unionType && 7999receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 8489receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 9590Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true }); 10695targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true } unionType && 12258receiverType.Type is NamedTypeSymbol { IsUnionType: true } unionType &&
Symbols\NamedTypeSymbol.cs (4)
1886if (!IsUnionType) 1915Debug.Assert(IsUnionType); 1956Debug.Assert(unionType.IsUnionType); 1976Debug.Assert(IsUnionType);
Symbols\PublicModel\TypeSymbol.cs (1)
203bool ITypeSymbol.IsUnion => UnderlyingTypeSymbol is Symbols.NamedTypeSymbol { IsUnionType: true };
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2083else if (IsUnionType)
Symbols\TypeSymbolExtensions.cs (2)
187public bool IsSubjectForUnionMatching => patternInputType.StrippedType() is NamedTypeSymbol { IsUnionType: true }; 191if (patternInputType.StrippedType() is NamedTypeSymbol { IsUnionType: true } named)
Utilities\ValueSetFactory.UnionTypeTypeUnionValueSetFactory.cs (1)
20Debug.Assert(unionType is NamedTypeSymbol { IsUnionType: true });