6 instantiations of BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (2)
5001boundConstantPattern = new BoundConstantPattern( 5007boundConstantPattern = new BoundConstantPattern(
Binder\Binder_Patterns.cs (2)
541return new BoundConstantPattern( 550return new BoundConstantPattern(
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
1167var nullCheck = new BoundConstantPattern(node.Syntax,
Generated\BoundNodes.xml.Generated.cs (1)
8176var result = new BoundConstantPattern(this.Syntax, value, constantValue, unionMatchingMode, inputType, narrowedType, this.HasErrors);
37 references to BoundConstantPattern
Microsoft.CodeAnalysis.CSharp (37)
Binder\Binder_Operators.cs (1)
4986BoundConstantPattern boundConstantPattern;
Binder\Binder_Patterns.cs (2)
121case BoundConstantPattern _: 159case BoundConstantPattern _:
Binder\DecisionDagBuilder_CheckOrReachability.cs (4)
874or BoundConstantPattern 1025public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 1084if (pattern is BoundConstantPattern constantPattern) 1167var nullCheck = new BoundConstantPattern(node.Syntax,
Binder\DecisionDagBuilder.cs (3)
384case BoundConstantPattern constant: 869BoundConstantPattern constant, 891Tests makeTestsForNonNullConstantPattern(TestInputOutputInfo inputInfo, BoundConstantPattern constant, out TestInputOutputInfo output)
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)!;
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)
1988var 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)
8172public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, UnionMatchingMode unionMatchingMode, TypeSymbol inputType, TypeSymbol narrowedType) 8176var result = new BoundConstantPattern(this.Syntax, value, constantValue, unionMatchingMode, inputType, narrowedType, this.HasErrors); 9504return VisitConstantPattern((BoundConstantPattern)node, arg); 9773public virtual R VisitConstantPattern(BoundConstantPattern node, A arg) => this.DefaultVisit(node, arg); 10014public virtual BoundNode? VisitConstantPattern(BoundConstantPattern node) => this.DefaultVisit(node); 10974public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 12514public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 15207public override BoundNode? VisitConstantPattern(BoundConstantPattern node) 17456public override TreeDumperNode VisitConstantPattern(BoundConstantPattern node, object? arg) => new TreeDumperNode("constantPattern", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (3)
224return CreateBoundConstantPatternOperation((BoundConstantPattern)boundNode); 2600private IConstantPatternOperation CreateBoundConstantPatternOperation(BoundConstantPattern boundConstantPattern) 2843boundSwitchLabel.Pattern is BoundConstantPattern cp &&