diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-08 16:50:51 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-08 16:50:51 +0800 |
commit | 8772b47c0e2d3761cc6b33769e98223c08ca9629 (patch) | |
tree | ea65165a14a7052effca953a53f8698aea5f97d7 /script/vm/compiler.lua | |
parent | f33b06fd928fd3541eea99b11ee6caf9b249a49b (diff) | |
download | lua-language-server-8772b47c0e2d3761cc6b33769e98223c08ca9629.zip |
fix
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 08fc2296..889c70a1 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -842,6 +842,16 @@ local compilerSwitch = util.switch() local vararg = source.vararg if vararg.type == 'call' then local node = getReturn(vararg.node, source.sindex, vararg.args) + if not node then + return + end + for n in nodeMgr.eachNode(node) do + if n.type == 'global' + and n.cate == 'type' + and n.name == '...' then + return + end + end nodeMgr.setNode(source, node) end if vararg.type == 'varargs' then @@ -855,6 +865,16 @@ local compilerSwitch = util.switch() : case 'call' : call(function (source) local node = getReturn(source.node, 1, source.args) + if not node then + return + end + for n in nodeMgr.eachNode(node) do + if n.type == 'global' + and n.cate == 'type' + and n.name == '...' then + return + end + end nodeMgr.setNode(source, node) end) : case 'in' |