summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-26 21:28:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-26 21:28:33 +0800
commit32f85a5757c6fca2529e287a58d358da54a422e4 (patch)
tree2291611aed343480e51fde73a84eee6eaaf71736 /script/vm
parenteb0735fd4cb9530dfa6534d7424d08155e4fb619 (diff)
downloadlua-language-server-32f85a5757c6fca2529e287a58d358da54a422e4.zip
fix #1092
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua17
1 files changed, 5 insertions, 12 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 2b63e868..75620d19 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -575,6 +575,11 @@ local function bindDocs(source)
vm.setNode(source, vm.compileNode(ast))
return true
end
+ if doc.type == 'doc.overload' then
+ if not isParam then
+ vm.setNode(source, vm.compileNode(doc))
+ end
+ end
end
return false
end
@@ -886,18 +891,6 @@ local function compileLocal(source)
vm.compileNode(source.parent)
end
- if source.bindDocs then
- local isParam = source.parent.type == 'funcargs'
- or source.parent.type == 'in'
- for _, doc in ipairs(source.bindDocs) do
- if doc.type == 'doc.overload' then
- if not isParam then
- vm.setNode(source, vm.compileNode(doc))
- end
- end
- end
- end
-
vm.getNode(source):setData('hasDefined', hasMarkDoc or hasMarkParam or hasMarkValue)
end