33 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (33)
Binder\Binder_Patterns.cs (2)
959Debug.Assert(unionType.IsUnionType); 1822inputType is NamedTypeSymbol { IsUnionType: true } inputUnionType &&
Binder\DecisionDagBuilder.cs (4)
487propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 680tryGetValueInput.Type is NamedTypeSymbol { IsUnionType: true } match) 739propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 1011if ((receiver is null ? input.Type : receiver.Type.StrippedType()) is NamedTypeSymbol { IsUnionType: true } unionType &&
Binder\PatternExplainer.cs (1)
733e.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)
272if (!conversion.IsUnion && !(caseExpression.IsLiteralNull() && SwitchGoverningType.StrippedType() is NamedTypeSymbol { IsUnionType: true }))
CodeGen\EmitExpression.cs (1)
1699if (receiver is not BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol { IsUnionType: true } })
CodeGen\Optimizer.cs (2)
1183if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: TypeParameterSymbol or NamedTypeSymbol { IsUnionType: true } } typeExpression) 2324if (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 && 4460type is NamedTypeSymbol { IsUnionType: true } unionType && 8012receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 8502receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 9603Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true }); 10714targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true } unionType && 12316receiverType.Type is NamedTypeSymbol { IsUnionType: true } unionType &&
Symbols\NamedTypeSymbol.cs (8)
1968if (!IsUnionType) 2049Debug.Assert(IsUnionType); 2187Debug.Assert(unionType.IsUnionType); 2244Debug.Assert(IsUnionType); 2370Debug.Assert(IsUnionType); 2533Debug.Assert(this.IsUnionType); 2703Debug.Assert(this.IsUnionType); 2864Debug.Assert(this.IsUnionType);
Symbols\PublicModel\TypeSymbol.cs (2)
205bool ITypeSymbol.IsUnion => UnderlyingTypeSymbol is Symbols.NamedTypeSymbol { IsUnionType: true }; 211if (UnderlyingTypeSymbol is not Symbols.NamedTypeSymbol { IsUnionType: true } namedType)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2108else 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 });