Follow-up on comment #50650 (comment)
Relates to the code below. We may not need this array builder.
Tagging @AlekseyTs if you want to add any details.
private void AddDeclaredNontypeMembers(DeclaredMembersAndInitializersBuilder builder, DiagnosticBag diagnostics)
{
...
static ArrayBuilder<FieldOrPropertyInitializer>? noteRecordParameters(RecordDeclarationSyntax syntax, DeclaredMembersAndInitializersBuilder builder, DiagnosticBag diagnostics)
{
var parameterList = syntax.ParameterList;
if (parameterList is null)
{
return null;
}
if (builder.RecordDeclarationWithParameters is null)
{
builder.RecordDeclarationWithParameters = syntax;
// Keep track of which instance initializers we'll want to update when we synthesize record properties
builder.InstanceInitializersIndexForRecordDeclarationWithParameters = builder.InstanceInitializers.Count;
return ArrayBuilder<FieldOrPropertyInitializer>.GetInstance();
}
else
{
diagnostics.Add(ErrorCode.ERR_MultipleRecordParameterLists, parameterList.Location);
return null;
}
}
}
Follow-up on comment #50650 (comment)
Relates to the code below. We may not need this array builder.
Tagging @AlekseyTs if you want to add any details.