autorest
autorest copied to clipboard
Duplicate local variables when parameter flattening
In some cases when parameter objects are flattened (in the case where they have 2 or less properties), non-compiling code is generated. It looks like an issue where when we flatten parameters we name the parameter object variable the same as a method parameter value.
For example:
public async Task
And later we do:
UpdateParameters tags = null; // Here's where we set it a second time
if (tags != null)
{
tags = new UpdateParameters();
tags.Tags = tags;
}