diff --git a/src/EditorFeatures/CSharpTest/CodeActions/InlineTemporary/InlineTemporaryTests.cs b/src/EditorFeatures/CSharpTest/CodeActions/InlineTemporary/InlineTemporaryTests.cs index 702e5036ec4c1649ba525d440009ff43a117b306..383f9625f5e2c0af424e5f97338efe2a10d04803 100644 --- a/src/EditorFeatures/CSharpTest/CodeActions/InlineTemporary/InlineTemporaryTests.cs +++ b/src/EditorFeatures/CSharpTest/CodeActions/InlineTemporary/InlineTemporaryTests.cs @@ -4491,8 +4491,7 @@ class C void M() { var t = new { - /*comment*/ - i = 1 + 2, + /*comment*/ i = 1 + 2, /*comment*/ j = 3 }; } diff --git a/src/Workspaces/CSharp/Portable/Simplification/CSharpSimplificationService.Expander.cs b/src/Workspaces/CSharp/Portable/Simplification/CSharpSimplificationService.Expander.cs index d3657f8e5eae90375baec53d1407c6f159516420..3d2400927bb592f3f698566b3b107138dcddb152 100644 --- a/src/Workspaces/CSharp/Portable/Simplification/CSharpSimplificationService.Expander.cs +++ b/src/Workspaces/CSharp/Portable/Simplification/CSharpSimplificationService.Expander.cs @@ -332,7 +332,7 @@ public override SyntaxNode VisitAnonymousObjectMemberDeclarator(AnonymousObjectM var inferredName = node.Expression.TryGetInferredMemberName(); if (inferredName != null) { - var identifier = SyntaxFactory.Identifier(inferredName); + var identifier = SyntaxFactory.Identifier(SyntaxTriviaList.Empty, inferredName, SyntaxTriviaList.Empty); identifier = TryEscapeIdentifierToken(identifier, node, _semanticModel); newDeclarator = newDeclarator