diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 20:20:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 20:20:28 +0800 |
commit | b93e0756cc07d9188a8047438f502ff296d5ec66 (patch) | |
tree | a2de65273f09cba6e516c54d513296e82bfb9a62 /script/vm | |
parent | 76b8cf3236db2efc7f73f3508212d99199b73b52 (diff) | |
download | lua-language-server-b93e0756cc07d9188a8047438f502ff296d5ec66.zip |
copy nodes when tracing list
fix #1841
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/tracer.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/vm/tracer.lua b/script/vm/tracer.lua index 823029f0..6ce57d5c 100644 --- a/script/vm/tracer.lua +++ b/script/vm/tracer.lua @@ -530,7 +530,7 @@ local lookIntoChild = util.switch() ---@param outNode? vm.node : call(function (tracer, action, topNode, outNode) for _, ret in ipairs(action) do - tracer:lookIntoChild(ret, topNode) + tracer:lookIntoChild(ret, topNode:copy()) end return topNode, outNode end) @@ -571,7 +571,7 @@ local lookIntoChild = util.switch() for i = 2, #action.args do tracer:lookIntoChild(action.args[i], topNode, topNode:copy()) end - topNode = tracer:lookIntoChild(action.args[1], topNode, topNode:copy()) + topNode = tracer:lookIntoChild(action.args[1], topNode:copy(), topNode:copy()) end tracer:lookIntoChild(action.node, topNode) tracer:lookIntoChild(action.args, topNode) |