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