Skip to content

Commit d4ef227

Browse files
committed
Fix bug in primitive conversion rewriter preventing the correct visitation
1 parent 09d06de commit d4ef227

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ internal class PrimitiveSimplificationRewriter : CSharpSyntaxRewriter
4444
{ "System.UInt64", SyntaxKind.ULongKeyword },
4545
};
4646

47-
public override SyntaxNode? VisitIdentifierName(IdentifierNameSyntax node)
47+
public override SyntaxNode? VisitQualifiedName(QualifiedNameSyntax node)
4848
{
49-
if ( s_primitives.TryGetValue(node.Identifier.Text, out SyntaxKind keyword))
49+
if (s_primitives.TryGetValue(node.Right.Identifier.Text, out SyntaxKind keyword))
5050
{
5151
return SyntaxFactory.PredefinedType(SyntaxFactory.Token(keyword)).WithTriviaFrom(node);
5252
}
5353

54-
return base.VisitIdentifierName(node);
54+
return base.VisitQualifiedName(node);
5555
}
5656
}

0 commit comments

Comments
 (0)