You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior: Both attribute lists for FirstAttribute and SecondAttribute have the assembly: target specifier.
Actual Behavior: Only FirstAttribute has the target specifier.
This is bug is due to the fact that the path where CSharpSyntaxGenerator adds the specifier is only called when no attributes currently exist on the parent syntax node. In the provided code snippet, the WithAttributeLists method adds the target specifier; however, it is only called when there are no existing attributes.
Version Used: 4.2.0-2.22128.1
Steps to Reproduce:
SyntaxGenerator
instance for a C# workspace (VB probably has the same bug) and name itgen
.Expected Behavior: Both attribute lists for
FirstAttribute
andSecondAttribute
have theassembly:
target specifier.Actual Behavior: Only
FirstAttribute
has the target specifier.This is bug is due to the fact that the path where
CSharpSyntaxGenerator
adds the specifier is only called when no attributes currently exist on the parent syntax node. In the provided code snippet, theWithAttributeLists
method adds the target specifier; however, it is only called when there are no existing attributes.roslyn/src/Workspaces/CSharp/Portable/CodeGeneration/CSharpSyntaxGenerator.cs
Lines 994 to 1013 in 696fe63
The text was updated successfully, but these errors were encountered: