6 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (2)
4882boundConstantPattern = new BoundConstantPattern( 4888boundConstantPattern = new BoundConstantPattern(
Binder\Binder_Patterns.cs (2)
1013return new BoundConstantPattern( 1022return new BoundConstantPattern(
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
1097var nullCheck = new BoundConstantPattern(node.Syntax,
Generated\BoundNodes.xml.Generated.cs (1)
8172var 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)
4867BoundConstantPattern boundConstantPattern;
Binder\Binder_Patterns.cs (2)
594case BoundConstantPattern _: 632case BoundConstantPattern _:
Binder\DecisionDagBuilder.cs (3)
375case BoundConstantPattern constant: 860BoundConstantPattern constant, 882Tests 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)
72public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 74node = (BoundConstantPattern)base.VisitConstantPattern(node)!;
BoundTree\BoundNode_Source.cs (1)
358case BoundConstantPattern constantPattern:
FlowAnalysis\AbstractFlowPass.cs (6)
928BoundDeclarationPattern or BoundConstantPattern or BoundNegatedPattern or BoundBinaryPattern or 989case BoundConstantPattern { ConstantValue: { IsNull: false } }: 993case BoundConstantPattern { ConstantValue: { IsNull: true } }: 1034case BoundConstantPattern { ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }: 1065case BoundConstantPattern { ConstantValue: { IsBoolean: false } }: 1108public override BoundNode VisitConstantPattern(BoundConstantPattern node)
FlowAnalysis\DefiniteAssignment.cs (2)
1979var pat = (BoundConstantPattern)pattern;
FlowAnalysis\NullableWalker_Patterns.cs (2)
65public override BoundNode VisitConstantPattern(BoundConstantPattern node) 170case BoundConstantPattern cp:
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100case BoundConstantPattern constantPattern:
Generated\BoundNodes.xml.Generated.cs (9)
8168public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, bool isUnionMatching, TypeSymbol inputType, TypeSymbol narrowedType) 8172var result = new BoundConstantPattern(this.Syntax, value, constantValue, isUnionMatching, inputType, narrowedType, this.HasErrors); 9500return VisitConstantPattern((BoundConstantPattern)node, arg); 9769public virtual R VisitConstantPattern(BoundConstantPattern node, A arg) => this.DefaultVisit(node, arg); 10010public virtual BoundNode? VisitConstantPattern(BoundConstantPattern node) => this.DefaultVisit(node); 10970public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 12510public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 15203public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 17451public 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 &&