Skip to content

Commit 09d06de

Browse files
committed
Fix bug in GlobalPrefixRemover preventing the removal of just global (it was also removing System)
1 parent 969358b commit 09d06de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff/SyntaxRewriter/GlobalPrefixRemover.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal class GlobalPrefixRemover : CSharpSyntaxRewriter
1818
if (node.Left is AliasQualifiedNameSyntax alias &&
1919
alias.Alias.Identifier.Text == GlobalPrefix)
2020
{
21-
return node.Right;
21+
node = SyntaxFactory.QualifiedName(alias.Name, node.Right).WithTriviaFrom(node);
2222
}
2323
return base.VisitQualifiedName(node);
2424
}

0 commit comments

Comments
 (0)