3 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Operators.cs (1)
3205var boundConstantPattern = new BoundConstantPattern(
Binder\Binder_Patterns.cs (1)
439return new BoundConstantPattern(
Generated\BoundNodes.xml.Generated.cs (1)
7722var result = new BoundConstantPattern(this.Syntax, value, constantValue, inputType, narrowedType, this.HasErrors);
29 references to BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Operators.cs (1)
3205var boundConstantPattern = new BoundConstantPattern(
Binder\Binder_Patterns.cs (2)
73case BoundConstantPattern _: 109case BoundConstantPattern _:
Binder\DecisionDagBuilder.cs (2)
289case BoundConstantPattern constant: 481BoundConstantPattern constant,
Binder\SwitchBinder_Patterns.cs (2)
109if (label.Pattern is BoundConstantPattern cp && !cp.ConstantValue.IsBad && FindMatchingSwitchCaseLabel(cp.ConstantValue, p) != label.Label) 288if (pattern is BoundConstantPattern { HasErrors: false } && IsUnderscore(expression))
FlowAnalysis\AbstractFlowPass.cs (6)
921BoundDeclarationPattern or BoundConstantPattern or BoundNegatedPattern or BoundBinaryPattern or 982case BoundConstantPattern { ConstantValue: { IsNull: false } }: 986case BoundConstantPattern { ConstantValue: { IsNull: true } }: 1017case BoundConstantPattern { ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }: 1037case BoundConstantPattern { ConstantValue: { IsBoolean: false } }: 1058public override BoundNode VisitConstantPattern(BoundConstantPattern node)
FlowAnalysis\DefiniteAssignment.cs (2)
1888var pat = (BoundConstantPattern)pattern;
FlowAnalysis\NullableWalker_Patterns.cs (2)
63public override BoundNode VisitConstantPattern(BoundConstantPattern node) 144case BoundConstantPattern cp:
Generated\BoundNodes.xml.Generated.cs (9)
7718public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 7722var result = new BoundConstantPattern(this.Syntax, value, constantValue, inputType, narrowedType, this.HasErrors); 8917return VisitConstantPattern((BoundConstantPattern)node, arg); 9171public virtual R VisitConstantPattern(BoundConstantPattern node, A arg) => this.DefaultVisit(node, arg); 9399public virtual BoundNode? VisitConstantPattern(BoundConstantPattern node) => this.DefaultVisit(node); 10302public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 11619public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 14173public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 16287public override TreeDumperNode VisitConstantPattern(BoundConstantPattern node, object? arg) => new TreeDumperNode("constantPattern", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (3)
221return CreateBoundConstantPatternOperation((BoundConstantPattern)boundNode); 2398private IConstantPatternOperation CreateBoundConstantPatternOperation(BoundConstantPattern boundConstantPattern) 2613boundSwitchLabel.Pattern is BoundConstantPattern cp &&