summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
authorKevin Hahn <hahn.kev@gmail.com>2022-06-27 12:32:29 +0700
committerKevin Hahn <hahn.kev@gmail.com>2022-06-27 14:14:36 +0700
commitbd517b96174441ace37885353d5570f2d11e6404 (patch)
treef4bc4b493378f9e1abbdc380c249f7d982783ab5 /script/vm
parenteb6165ea4cafe386d8aa38f7ad33a40e14d404fe (diff)
downloadlua-language-server-bd517b96174441ace37885353d5570f2d11e6404.zip
fix some cases where we would return emus twice or would screw up other completions
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index d0063d00..409b2f47 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1494,14 +1494,10 @@ local compilerSwitch = util.switch()
if (source.parent.type == 'table') then
local node = vm.compileNode(source.parent)
for n in node:eachObject() do
- if (n.type == 'global'
- and n.cate == 'type') then
- vm.setNode(source, vm.compileNode(n))
- elseif n.type == 'doc.type.array' then
+ if n.type == 'doc.type.array' then
vm.setNode(source, vm.compileNode(n.node))
end
end
- return
end
vm.setNode(source, vm.compileNode(source.value))
end)