4 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Patterns.cs (2)
680
return new
BoundConstantPattern
(
684
return new
BoundConstantPattern
(
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
1097
var nullCheck = new
BoundConstantPattern
(node.Syntax,
Generated\BoundNodes.xml.Generated.cs (1)
8192
var result = new
BoundConstantPattern
(this.Syntax, value, constantValue, isUnionMatching, inputType, narrowedType, this.HasErrors);
38 references to BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_Operators.cs (1)
4866
BoundConstantPattern
boundConstantPattern;
Binder\Binder_Patterns.cs (2)
262
case
BoundConstantPattern
_:
300
case
BoundConstantPattern
_:
Binder\DecisionDagBuilder.cs (3)
375
case
BoundConstantPattern
constant:
857
BoundConstantPattern
constant,
879
Tests makeTestsForNonNullConstantPattern(TestInputOutputInfo inputInfo,
BoundConstantPattern
constant, out TestInputOutputInfo output)
Binder\DecisionDagBuilder_CheckOrReachability.cs (4)
804
or
BoundConstantPattern
955
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
1014
if (pattern is
BoundConstantPattern
constantPattern)
1097
var
nullCheck = new BoundConstantPattern(node.Syntax,
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)
74
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
76
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
1037
case
BoundConstantPattern
{ ConstantValue: { IsNull: false } }:
1041
case
BoundConstantPattern
{ ConstantValue: { IsNull: true } }:
1082
case
BoundConstantPattern
{ ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }:
1113
case
BoundConstantPattern
{ ConstantValue: { IsBoolean: false } }:
1156
public override BoundNode VisitConstantPattern(
BoundConstantPattern
node)
FlowAnalysis\DefiniteAssignment.cs (2)
1979
var
pat = (
BoundConstantPattern
)pattern;
FlowAnalysis\NullableWalker_Patterns.cs (2)
63
public override BoundNode VisitConstantPattern(
BoundConstantPattern
node)
166
case
BoundConstantPattern
cp:
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100
case
BoundConstantPattern
constantPattern:
Generated\BoundNodes.xml.Generated.cs (9)
8188
public
BoundConstantPattern
Update(BoundExpression value, ConstantValue constantValue, bool isUnionMatching, TypeSymbol inputType, TypeSymbol narrowedType)
8192
var
result = new BoundConstantPattern(this.Syntax, value, constantValue, isUnionMatching, inputType, narrowedType, this.HasErrors);
9522
return VisitConstantPattern((
BoundConstantPattern
)node, arg);
9791
public virtual R VisitConstantPattern(
BoundConstantPattern
node, A arg) => this.DefaultVisit(node, arg);
10032
public virtual BoundNode? VisitConstantPattern(
BoundConstantPattern
node) => this.DefaultVisit(node);
10980
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
12517
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
15205
public override BoundNode? VisitConstantPattern(
BoundConstantPattern
node)
17450
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 &&