1 write to ConstantValue
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
8154
this.
ConstantValue
= constantValue;
21 references to ConstantValue
Microsoft.CodeAnalysis.CSharp (21)
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
1086
var narrowedType = constantPattern.
ConstantValue
.IsNull ? inputType : constantPattern.NarrowedType;
1087
return constantPattern.Update(constantPattern.Value, constantPattern.
ConstantValue
, unionMatchingMode: UnionMatchingMode.None, inputType, narrowedType);
Binder\DecisionDagBuilder.cs (2)
871
if (constant.
ConstantValue
== ConstantValue.Null)
892
ConstantValue constantValue = constant.
ConstantValue
;
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)
89
Debug.Assert(Binder.IsClassOrNullableValueTypeUnionNullPatternMatching((NamedTypeSymbol)node.InputType, node.
ConstantValue
));
96
node.Update(node.Value, node.
ConstantValue
, unionMatchingMode: UnionMatchingMode.None, inputType: ObjectType, narrowedType: ObjectType));
100
left: node.Update(node.Value, node.
ConstantValue
, unionMatchingMode: UnionMatchingMode.None, node.InputType, node.InputType).MakeCompilerGenerated(),
109
node.Update(node.Value, node.
ConstantValue
, unionMatchingMode: UnionMatchingMode.None, 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)
989
case BoundConstantPattern {
ConstantValue
: { IsNull: false } }:
993
case BoundConstantPattern {
ConstantValue
: { IsNull: true } }:
1034
case BoundConstantPattern {
ConstantValue
: { IsBoolean: true, BooleanValue: var boolValue } }:
1065
case BoundConstantPattern {
ConstantValue
: { IsBoolean: false } }:
Generated\BoundNodes.xml.Generated.cs (4)
8171
if (value != this.Value || constantValue != this.
ConstantValue
|| unionMatchingMode != this.UnionMatchingMode || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
12522
return node.Update(value, node.
ConstantValue
, node.UnionMatchingMode, inputType, narrowedType);
15217
return node.Update(value, node.
ConstantValue
, node.UnionMatchingMode, inputType, narrowedType);
17465
new TreeDumperNode("constantValue", node.
ConstantValue
, null),