Skip to content

[Bug] "error CS1016: Named attribute argument expected" when declaring breaking change with "changeInEffectByDate" #1527

Description

@isra-fel

Regression introduced by #1508

The constructor of GenericBreakingChangeAttribute has four parameters: string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate.
According to spec, the positional arguments (if any) precede the named arguments..

The issue can be fixed by change the order of the parameters at

parameters.push('""');
parameters.push(`"${breakingChange.cmdlet.deprecateByAzVersion}"`);
parameters.push(`"${breakingChange.cmdlet.deprecateByVersion}"`);
parameters.push(`ChangeDescription = "${breakingChange.cmdlet.changeDescription}"`);
if (breakingChange.cmdlet.changeInEfectByDate) parameters.push(`"${breakingChange.cmdlet.changeInEfectByDate}"`);
return new Attribute(ClientRuntime.GenericBreakingChangeAttribute, { parameters: parameters });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions