diff --git a/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs b/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs index b519066b..2e32afce 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs @@ -244,7 +244,7 @@ internal sealed class ShaderSourceRewriter : HlslSourceRewriter // If the member access is a this. access, rewrite it to strip "this." if (node.Expression.IsKind(SyntaxKind.ThisExpression)) { - return node.Name; + return updatedNode.Name; } } diff --git a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs index 59e5e7fd..ff8329ff 100644 --- a/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs +++ b/src/ComputeSharp.SourceGenerators/SyntaxRewriters/ShaderSourceRewriter.cs @@ -276,7 +276,7 @@ internal sealed class ShaderSourceRewriter : HlslSourceRewriter // If the member access is a this. access, rewrite it to strip "this." if (node.Expression.IsKind(SyntaxKind.ThisExpression)) { - return node.Name; + return updatedNode.Name; } }