1 write to ConstantValue
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
8173
this.
ConstantValue
= constantValue;
21 references to ConstantValue
Microsoft.CodeAnalysis.CSharp (21)
Binder\DecisionDagBuilder.cs (2)
860
if (constant.
ConstantValue
== ConstantValue.Null)
881
ConstantValue constantValue = constant.
ConstantValue
;
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
1016
var narrowedType = constantPattern.
ConstantValue
.IsNull ? inputType : constantPattern.NarrowedType;
1017
return constantPattern.Update(constantPattern.Value, constantPattern.
ConstantValue
, isUnionMatching: false, 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());
Binder\UnionMatchingRewriter.cs (4)
81
if (Binder.IsClassOrNullableValueTypeUnionNullPatternMatching((NamedTypeSymbol)node.InputType, node.
ConstantValue
) && node.NarrowedType.Equals(node.InputType, TypeCompareKind.AllIgnoreOptions))
87
node.Update(node.Value, node.
ConstantValue
, isUnionMatching: false, inputType: ObjectType, narrowedType: ObjectType));
91
left: node.Update(node.Value, node.
ConstantValue
, isUnionMatching: false, node.InputType, node.InputType),
100
node.Update(node.Value, node.
ConstantValue
, isUnionMatching: false, inputType: ObjectType, narrowedType: node.NarrowedType));
BoundTree\BoundConstantPattern.cs (1)
18
(
ConstantValue
== ConstantValue.Null && (InputType.IsNullableType() || !InputType.IsValueType) && NarrowedType.Equals(InputType, TypeCompareKind.AllIgnoreOptions)));
BoundTree\BoundNode_Source.cs (1)
360
appendConstantValue(constantPattern.
ConstantValue
);
FlowAnalysis\AbstractFlowPass.cs (4)
1037
case BoundConstantPattern {
ConstantValue
: { IsNull: false } }:
1041
case BoundConstantPattern {
ConstantValue
: { IsNull: true } }:
1082
case BoundConstantPattern {
ConstantValue
: { IsBoolean: true, BooleanValue: var boolValue } }:
1113
case BoundConstantPattern {
ConstantValue
: { IsBoolean: false } }:
Generated\BoundNodes.xml.Generated.cs (4)
8190
if (value != this.Value || constantValue != this.
ConstantValue
|| isUnionMatching != this.IsUnionMatching || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
12522
return node.Update(value, node.
ConstantValue
, node.IsUnionMatching, inputType, narrowedType);
15210
return node.Update(value, node.
ConstantValue
, node.IsUnionMatching, inputType, narrowedType);
17453
new TreeDumperNode("constantValue", node.
ConstantValue
, null),