24 references to UnionMatchingMode
Microsoft.CodeAnalysis.CSharp (24)
Binder\Binder_Operators.cs (4)
4999
node.Right, convertedExpression, constantValueOpt, unionMatchingMode:
UnionMatchingMode
.Both, inputType: unionMatchingInputType, narrowedType: unionMatchingInputType, hasErrors).MakeCompilerGenerated();
5007
unionMatchingMode: unionMatchingInputType is not null ?
UnionMatchingMode
.UnionValue :
UnionMatchingMode
.None,
5015
boundConstantPattern.UnionMatchingMode !=
UnionMatchingMode
.None,
Binder\Binder_Patterns.cs (3)
542
node, convertedExpression, constantValueOpt, unionMatchingMode:
UnionMatchingMode
.Both, inputType: unionMatchingInputType, narrowedType: unionMatchingInputType, hasErrors);
553
unionMatchingMode: hasUnionMatching ?
UnionMatchingMode
.UnionValue :
UnionMatchingMode
.None,
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
1087
return constantPattern.Update(constantPattern.Value, constantPattern.ConstantValue, unionMatchingMode:
UnionMatchingMode
.None, inputType, narrowedType);
1169
ConstantValue.Null, unionMatchingMode:
UnionMatchingMode
.None, node.InputType, node.InputType, hasErrors: false);
Binder\UnionMatchingRewriter.cs (6)
75
if (node.UnionMatchingMode !=
UnionMatchingMode
.None)
79
Debug.Assert((node.UnionMatchingMode &
UnionMatchingMode
.UnionValue) != 0);
81
if ((node.UnionMatchingMode &
UnionMatchingMode
.UnionInstance) != 0)
90
node.Update(node.Value, node.ConstantValue, unionMatchingMode:
UnionMatchingMode
.None, inputType: ObjectType, narrowedType: ObjectType));
94
left: node.Update(node.Value, node.ConstantValue, unionMatchingMode:
UnionMatchingMode
.None, node.InputType, node.InputType).MakeCompilerGenerated(),
103
node.Update(node.Value, node.ConstantValue, unionMatchingMode:
UnionMatchingMode
.None, inputType: ObjectType, narrowedType: node.NarrowedType));
BoundTree\BoundConstantPattern.cs (6)
14
Debug.Assert(UnionMatchingMode is
UnionMatchingMode
.None or
UnionMatchingMode
.UnionValue or (
UnionMatchingMode
.UnionValue |
UnionMatchingMode
.UnionInstance));
16
if (UnionMatchingMode !=
UnionMatchingMode
.None)
29
public override bool IsUnionMatching => UnionMatchingMode is not
UnionMatchingMode
.None;
Generated\BoundNodes.xml.Generated.cs (3)
8144
public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue,
UnionMatchingMode
unionMatchingMode, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8164
public
UnionMatchingMode
UnionMatchingMode { get; }
8169
public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue,
UnionMatchingMode
unionMatchingMode, TypeSymbol inputType, TypeSymbol narrowedType)