Base:
property
ConstantValueOpt
Microsoft.CodeAnalysis.CSharp.BoundExpression.ConstantValueOpt
2 writes to ConstantValueOpt
Microsoft.CodeAnalysis.CSharp (2)
Generated\BoundNodes.xml.Generated.cs (2)
4303this.ConstantValueOpt = constantValueOpt; 4309this.ConstantValueOpt = constantValueOpt;
22 references to ConstantValueOpt
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Attributes.cs (1)
389(arguments[argIndex].IsParamsArrayOrCollection && arguments[argIndex] is BoundArrayCreation { Bounds: [BoundLiteral { ConstantValueOpt.Value: 0 }] }) ?
Binder\Binder_Expressions.cs (1)
7717if (boundLeft.Kind == BoundKind.Literal && ((BoundLiteral)boundLeft).ConstantValueOpt == ConstantValue.Null)
Binder\Binder_InterpolatedString.cs (7)
325BoundStringInsert { Format.ConstantValueOpt: null or { IsBad: true } }); 392Debug.Assert(fillin.Format.ConstantValueOpt is { }); 393stringBuilder.Append(':').Append(fillin.Format.ConstantValueOpt.StringValue); 887Debug.Assert(part is BoundLiteral { Type: { SpecialType: SpecialType.System_String }, ConstantValueOpt.IsString: true }); 952Debug.Assert(boundLiteral.ConstantValueOpt != null && boundLiteral.ConstantValueOpt.IsString); 953var literalText = boundLiteral.ConstantValueOpt.StringValue;
BoundTree\BoundNode_Source.cs (2)
238var value = literal.ConstantValueOpt?.Value?.ToString(); 244switch (literal.ConstantValueOpt?.Discriminator)
BoundTree\Formatting.cs (1)
39get { return ConstantValueOpt?.IsNull == true ? MessageID.IDS_NULL.Localize() : base.Display; }
FlowAnalysis\NullableWalker.cs (1)
11594SetResultType(node, TypeWithState.Create(node.Type, node.Type?.CanContainNull() != false && node.ConstantValueOpt?.IsNull == true ? NullableFlowState.MaybeDefault : NullableFlowState.NotNull));
Generated\BoundNodes.xml.Generated.cs (4)
4319if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 11444return node.Update(node.ConstantValueOpt, type); 13479BoundLiteral updatedNode = node.Update(node.ConstantValueOpt, infoAndType.Type); 15944new TreeDumperNode("constantValueOpt", node.ConstantValueOpt, null),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
554return Constant(literal.Update(literal.ConstantValueOpt, promotedType));
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
1133if (possibleParamsArray.IsParamsArrayOrCollection && !_inExpressionLambda && ((BoundArrayCreation)possibleParamsArray).Bounds is [BoundLiteral { ConstantValueOpt.Value: 0 }])
Lowering\LocalRewriter\LocalRewriter_Literal.cs (2)
19Debug.Assert(node.ConstantValueOpt is { }); 20return MakeLiteral(node.Syntax, node.ConstantValueOpt, node.Type, oldNodeOpt: node);
Operations\CSharpOperationFactory.cs (1)
678ConstantValue? constantValue = boundLiteral.ConstantValueOpt;