Base:
property
InitializerExpressionOpt
Microsoft.CodeAnalysis.CSharp.BoundObjectCreationExpressionBase.InitializerExpressionOpt
1 write to InitializerExpressionOpt
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6359
this.
InitializerExpressionOpt
= initializerExpressionOpt;
29 references to InitializerExpressionOpt
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder.ValueChecks.cs (2)
4296
var initializerOpt = objectCreation.
InitializerExpressionOpt
;
5041
var initializerExpr = objectCreation.
InitializerExpressionOpt
;
Binder\Binder_Expressions.cs (3)
6787
CheckRequiredMembersInObjectInitializer(creation.Constructor, creation.
InitializerExpressionOpt
?.Initializers ?? default, creation.Syntax, diagnostics);
6967
creation.
InitializerExpressionOpt
, interfaceType);
9246
else if (convertedIndex is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true },
InitializerExpressionOpt
: null } &&
BoundTree\Expression.cs (1)
29
ImmutableArray<BoundNode> IBoundInvalidNode.InvalidNodeChildren => CSharpOperationFactory.CreateInvalidChildrenFromArgumentsExpression(receiverOpt: null, Arguments,
InitializerExpressionOpt
);
CodeGen\Optimizer.cs (2)
1320
Debug.Assert(node.
InitializerExpressionOpt
== null);
2144
Debug.Assert(node.
InitializerExpressionOpt
== null);
FlowAnalysis\AbstractFlowPass.cs (1)
2064
VisitRvalue(node.
InitializerExpressionOpt
);
FlowAnalysis\DefiniteAssignment.cs (1)
944
return !init.Constructor.IsImplicitlyDeclared || init.
InitializerExpressionOpt
!= null;
Generated\BoundNodes.xml.Generated.cs (5)
6380
if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || constructorsGroup != this.ConstructorsGroup || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || constantValueOpt != this.ConstantValueOpt || initializerExpressionOpt != this.
InitializerExpressionOpt
|| wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
10484
this.Visit(node.
InitializerExpressionOpt
);
11767
BoundObjectInitializerExpressionBase? initializerExpressionOpt = (BoundObjectInitializerExpressionBase?)this.Visit(node.
InitializerExpressionOpt
);
14008
BoundObjectInitializerExpressionBase? initializerExpressionOpt = (BoundObjectInitializerExpressionBase?)this.Visit(node.
InitializerExpressionOpt
);
16453
new TreeDumperNode("initializerExpressionOpt", null, new TreeDumperNode[] { Visit(node.
InitializerExpressionOpt
, null) }),
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
1027
return VisitObjectCreationContinued(VisitObjectCreationExpressionInternal(node), node.
InitializerExpressionOpt
);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
636
loweredInput.
InitializerExpressionOpt
, loweredInput.Type);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
729
else if (unloweredExpr is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true },
InitializerExpressionOpt
: null } &&
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (4)
77
rewrittenObjectCreation = node.Update(constructor, rewrittenArguments, argumentRefKindsOpt, MakeObjectCreationInitializerForExpressionTree(node.
InitializerExpressionOpt
), changeTypeOpt: constructor.ContainingType);
123
if (node.
InitializerExpressionOpt
== null || node.
InitializerExpressionOpt
.HasErrors)
128
return MakeExpressionWithInitializer(node.Syntax, rewrittenObjectCreation, node.
InitializerExpressionOpt
, node.Type);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
108
currentCreation.
InitializerExpressionOpt
,
Lowering\MethodToClassRewriter.cs (1)
577
rewritten.
InitializerExpressionOpt
,
Lowering\SpillSequenceSpiller.cs (3)
483
objectCreationExpression.
InitializerExpressionOpt
is null &&
1414
Debug.Assert(node.
InitializerExpressionOpt
== null);
1417
return UpdateExpression(builder, node.Update(node.Constructor, arguments, node.ArgumentNamesOpt, node.ArgumentRefKindsOpt, node.Expanded, node.ArgsToParamsOpt, node.DefaultArguments, node.ConstantValueOpt, node.
InitializerExpressionOpt
, node.Type));
Operations\CSharpOperationFactory.cs (1)
731
IObjectOrCollectionInitializerOperation? initializer = (IObjectOrCollectionInitializerOperation?)Create(boundObjectCreationExpression.
InitializerExpressionOpt
);
Symbols\Source\ParameterHelpers.cs (1)
902
return expression.Constructor.IsDefaultValueTypeConstructor() && expression.
InitializerExpressionOpt
== null;