diff --git a/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs b/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs index cd48a6bf..5c10cd5b 100644 --- a/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs +++ b/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs @@ -150,8 +150,8 @@ namespace ComputeSharp.Shaders.Translation rootNode = syntaxTree.GetRoot().DescendantNodes().OfType().First(node => node.GetLeadingTrivia().ToFullString().Contains(methodInfo.Name)); // Update the incremental compilation and retrieve the syntax tree for the method - _Compilation = _Compilation.AddSyntaxTrees(syntaxTree); - semanticModel = _Compilation.GetSemanticModel(syntaxTree); + Compilation compilation = _Compilation.AddSyntaxTrees(syntaxTree); + semanticModel = compilation.GetSemanticModel(syntaxTree); } ///