6 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (2)
4998
boundConstantPattern = new
BoundConstantPattern
(
5004
boundConstantPattern = new
BoundConstantPattern
(
Binder\Binder_Patterns.cs (2)
541
return new
BoundConstantPattern
(
550
return new
BoundConstantPattern
(
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
1167
var nullCheck = new
BoundConstantPattern
(node.Syntax,
Generated\BoundNodes.xml.Generated.cs (1)
8173
var result = new
BoundConstantPattern
(this.Syntax, value, constantValue, unionMatchingMode, inputType, narrowedType, this.HasErrors);
38 references to BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_Operators.cs (1)
4983
BoundConstantPattern
boundConstantPattern;
Binder\Binder_Patterns.cs (2)
121
case
BoundConstantPattern
_:
159
case
BoundConstantPattern
_:
Binder\DecisionDagBuilder_CheckOrReachability.cs (4)
874
or
BoundConstantPattern
1025
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
1084
if (pattern is
BoundConstantPattern
constantPattern)
1167
var
nullCheck = new BoundConstantPattern(node.Syntax,
Binder\DecisionDagBuilder.cs (3)
383
case
BoundConstantPattern
constant:
868
BoundConstantPattern
constant,
890
Tests makeTestsForNonNullConstantPattern(TestInputOutputInfo inputInfo,
BoundConstantPattern
constant, out TestInputOutputInfo output)
Binder\SwitchBinder_Patterns.cs (2)
117
if (label.Pattern is
BoundConstantPattern
cp && !cp.ConstantValue.IsBad && FindMatchingSwitchCaseLabel(cp.ConstantValue, p) != label.Label)
300
if (pattern is
BoundConstantPattern
{ HasErrors: false } && IsUnderscore(expression))
Binder\UnionMatchingRewriter.cs (2)
72
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
74
node = (
BoundConstantPattern
)base.VisitConstantPattern(node)!;
BoundTree\BoundNode_Source.cs (1)
358
case
BoundConstantPattern
constantPattern:
FlowAnalysis\AbstractFlowPass.cs (6)
928
BoundDeclarationPattern or
BoundConstantPattern
or BoundNegatedPattern or BoundBinaryPattern or
989
case
BoundConstantPattern
{ ConstantValue: { IsNull: false } }:
993
case
BoundConstantPattern
{ ConstantValue: { IsNull: true } }:
1034
case
BoundConstantPattern
{ ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }:
1065
case
BoundConstantPattern
{ ConstantValue: { IsBoolean: false } }:
1108
public override BoundNode VisitConstantPattern(
BoundConstantPattern
node)
FlowAnalysis\DefiniteAssignment.cs (2)
1979
var
pat = (
BoundConstantPattern
)pattern;
FlowAnalysis\NullableWalker_Patterns.cs (2)
65
public override BoundNode VisitConstantPattern(
BoundConstantPattern
node)
170
case
BoundConstantPattern
cp:
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100
case
BoundConstantPattern
constantPattern:
Generated\BoundNodes.xml.Generated.cs (9)
8169
public
BoundConstantPattern
Update(BoundExpression value, ConstantValue constantValue, UnionMatchingMode unionMatchingMode, TypeSymbol inputType, TypeSymbol narrowedType)
8173
var
result = new BoundConstantPattern(this.Syntax, value, constantValue, unionMatchingMode, inputType, narrowedType, this.HasErrors);
9501
return VisitConstantPattern((
BoundConstantPattern
)node, arg);
9770
public virtual R VisitConstantPattern(
BoundConstantPattern
node, A arg) => this.DefaultVisit(node, arg);
10011
public virtual BoundNode? VisitConstantPattern(
BoundConstantPattern
node) => this.DefaultVisit(node);
10971
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
12511
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
15204
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
17452
public override TreeDumperNode VisitConstantPattern(
BoundConstantPattern
node, object? arg) => new TreeDumperNode("constantPattern", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (3)
224
return CreateBoundConstantPatternOperation((
BoundConstantPattern
)boundNode);
2581
private IConstantPatternOperation CreateBoundConstantPatternOperation(
BoundConstantPattern
boundConstantPattern)
2824
boundSwitchLabel.Pattern is
BoundConstantPattern
cp &&