31 references to IsUnionType
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Patterns.cs (5)
88Debug.Assert(inputUnionType.IsUnionType); 236Debug.Assert(inputUnionType.IsUnionType); 410Debug.Assert(unionType.IsUnionType); 1366Debug.Assert(unionType is null || unionType.IsUnionType); 2308inputType 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)
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 && 4474type is NamedTypeSymbol { IsUnionType: true } unionType && 8026receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 8516receiverType is NamedTypeSymbol { IsUnionType: true } unionType && 9617Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true }); 10724targetTypeWithNullability.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true } unionType && 12326receiverType.Type is NamedTypeSymbol { IsUnionType: true } unionType &&
Symbols\NamedTypeSymbol.cs (4)
1892if (!IsUnionType) 1920Debug.Assert(IsUnionType); 2015Debug.Assert(unionType.IsUnionType); 2035Debug.Assert(IsUnionType);
Symbols\PublicModel\TypeSymbol.cs (1)
205bool 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 });