summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/core/signature.lua6
2 files changed, 6 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 0a5a7215..9ab1228c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -5,6 +5,7 @@
* `NEW` fully supports `---@generic T`
* `FIX` [#274](https://github.com/sumneko/lua-language-server/issues/274)
* `FIX` [#279](https://github.com/sumneko/lua-language-server/issues/279)
+* `FIX` [#280](https://github.com/sumneko/lua-language-server/issues/280)
## 1.4.0
`2020-12-3`
diff --git a/script/core/signature.lua b/script/core/signature.lua
index bd823454..2f652f39 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -80,11 +80,15 @@ local function makeSignatures(call, pos)
end
local signs = {}
local defs = vm.getDefs(node, 0)
+ local mark = {}
for _, src in ipairs(defs) do
src = guide.getObjectValue(src) or src
if src.type == 'function'
or src.type == 'doc.type.function' then
- signs[#signs+1] = makeOneSignature(src, oop, index)
+ if not mark[src] then
+ mark[src] = true
+ signs[#signs+1] = makeOneSignature(src, oop, index)
+ end
end
end
return signs