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