4 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Patterns.cs (2)
680return new BoundConstantPattern( 684return new BoundConstantPattern(
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
1097var nullCheck = new BoundConstantPattern(node.Syntax,
Generated\BoundNodes.xml.Generated.cs (1)
8192var 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)
4866BoundConstantPattern boundConstantPattern;
Binder\Binder_Patterns.cs (2)
262case BoundConstantPattern _: 300case BoundConstantPattern _:
Binder\DecisionDagBuilder.cs (3)
375case BoundConstantPattern constant: 857BoundConstantPattern constant, 879Tests makeTestsForNonNullConstantPattern(TestInputOutputInfo inputInfo, BoundConstantPattern constant, out TestInputOutputInfo output)
Binder\DecisionDagBuilder_CheckOrReachability.cs (4)
804or BoundConstantPattern 955public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 1014if (pattern is BoundConstantPattern constantPattern) 1097var nullCheck = new BoundConstantPattern(node.Syntax,
Binder\SwitchBinder_Patterns.cs (2)
117if (label.Pattern is BoundConstantPattern cp && !cp.ConstantValue.IsBad && FindMatchingSwitchCaseLabel(cp.ConstantValue, p) != label.Label) 300if (pattern is BoundConstantPattern { HasErrors: false } && IsUnderscore(expression))
Binder\UnionMatchingRewriter.cs (2)
74public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 76node = (BoundConstantPattern)base.VisitConstantPattern(node)!;
BoundTree\BoundNode_Source.cs (1)
358case BoundConstantPattern constantPattern:
FlowAnalysis\AbstractFlowPass.cs (6)
928BoundDeclarationPattern or BoundConstantPattern or BoundNegatedPattern or BoundBinaryPattern or 1037case BoundConstantPattern { ConstantValue: { IsNull: false } }: 1041case BoundConstantPattern { ConstantValue: { IsNull: true } }: 1082case BoundConstantPattern { ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }: 1113case BoundConstantPattern { ConstantValue: { IsBoolean: false } }: 1156public override BoundNode VisitConstantPattern(BoundConstantPattern node)
FlowAnalysis\DefiniteAssignment.cs (2)
1979var pat = (BoundConstantPattern)pattern;
FlowAnalysis\NullableWalker_Patterns.cs (2)
63public override BoundNode VisitConstantPattern(BoundConstantPattern node) 166case BoundConstantPattern cp:
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100case BoundConstantPattern constantPattern:
Generated\BoundNodes.xml.Generated.cs (9)
8188public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, bool isUnionMatching, TypeSymbol inputType, TypeSymbol narrowedType) 8192var result = new BoundConstantPattern(this.Syntax, value, constantValue, isUnionMatching, inputType, narrowedType, this.HasErrors); 9522return VisitConstantPattern((BoundConstantPattern)node, arg); 9791public virtual R VisitConstantPattern(BoundConstantPattern node, A arg) => this.DefaultVisit(node, arg); 10032public virtual BoundNode? VisitConstantPattern(BoundConstantPattern node) => this.DefaultVisit(node); 10980public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 12517public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 15205public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 17450public override TreeDumperNode VisitConstantPattern(BoundConstantPattern node, object? arg) => new TreeDumperNode("constantPattern", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (3)
224return CreateBoundConstantPatternOperation((BoundConstantPattern)boundNode); 2581private IConstantPatternOperation CreateBoundConstantPatternOperation(BoundConstantPattern boundConstantPattern) 2824boundSwitchLabel.Pattern is BoundConstantPattern cp &&