1 write to ConstantValue
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
8029
this.
ConstantValue
= constantValue;
19 references to ConstantValue
Microsoft.CodeAnalysis.CSharp (19)
Binder\DecisionDagBuilder.cs (5)
487
if (constant.
ConstantValue
== ConstantValue.Null)
492
else if (constant.
ConstantValue
.IsString && input.Type.IsSpanOrReadOnlySpanChar())
495
return new Tests.One(new BoundDagValueTest(constant.Syntax, constant.
ConstantValue
, input));
502
if (ValueSetFactory.ForInput(input)?.Related(BinaryOperatorKind.Equal, constant.
ConstantValue
).IsEmpty == true)
510
tests.Add(new Tests.One(new BoundDagValueTest(constant.Syntax, constant.
ConstantValue
, input)));
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
1007
var narrowedType = constantPattern.
ConstantValue
.IsNull ? inputType : constantPattern.NarrowedType;
1008
return constantPattern.Update(constantPattern.Value, constantPattern.
ConstantValue
, inputType, narrowedType);
Binder\SwitchBinder_Patterns.cs (3)
117
if (label.Pattern is BoundConstantPattern cp && !cp.
ConstantValue
.IsBad && FindMatchingSwitchCaseLabel(cp.
ConstantValue
, p) != label.Label)
120
diagnostics.Add(ErrorCode.ERR_DuplicateCaseLabel, syntax.Location, cp.
ConstantValue
.GetValueToDisplay());
BoundTree\BoundNode_Source.cs (1)
360
appendConstantValue(constantPattern.
ConstantValue
);
FlowAnalysis\AbstractFlowPass.cs (4)
988
case BoundConstantPattern {
ConstantValue
: { IsNull: false } }:
992
case BoundConstantPattern {
ConstantValue
: { IsNull: true } }:
1033
case BoundConstantPattern {
ConstantValue
: { IsBoolean: true, BooleanValue: var boolValue } }:
1064
case BoundConstantPattern {
ConstantValue
: { IsBoolean: false } }:
Generated\BoundNodes.xml.Generated.cs (4)
8044
if (value != this.Value || constantValue != this.
ConstantValue
|| !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
12234
return node.Update(value, node.
ConstantValue
, inputType, narrowedType);
14889
return node.Update(value, node.
ConstantValue
, inputType, narrowedType);
17077
new TreeDumperNode("constantValue", node.
ConstantValue
, null),