Skip to content

Commit 427ce24

Browse files
committed
Fixed a bug where replaced generic trailing space was ignored.
1 parent 2c1019a commit 427ce24

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CSharpToJavaScript/WithSemanticWalker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal class WithSemanticWalker : CSharpSyntaxWalker
1414
private readonly SemanticModel _Model;
1515
private readonly CSTOJSOptions _Options;
1616

17-
private readonly Dictionary<string, List<string>> _ExportedClasses = new();
17+
private readonly Dictionary<string, List<string>> _ExportedClasses;
1818

1919
private ITypeSymbol? _CurrentClassSymbol = null;
2020

@@ -598,7 +598,7 @@ private void VisitSimpleName(SimpleNameSyntax identifier, ISymbol? symbol)
598598

599599
if (BuiltInTypesGenerics(identifier, symbol, out string str))
600600
{
601-
ReplaceNodes.Add(identifier, SyntaxFactory.IdentifierName(str).WithLeadingTrivia(identifier.Identifier.LeadingTrivia).WithTrailingTrivia(identifier.Identifier.TrailingTrivia));
601+
ReplaceNodes.Add(identifier, SyntaxFactory.IdentifierName(str).WithLeadingTrivia(identifier.Identifier.LeadingTrivia).WithTrailingTrivia(identifier.GetTrailingTrivia()));
602602
return;
603603
}
604604
}

0 commit comments

Comments
 (0)