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