summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md2
-rw-r--r--script/core/signature.lua1
-rw-r--r--test/signature/init.lua14
3 files changed, 17 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index 1ed24bca..2f0b3326 100644
--- a/changelog.md
+++ b/changelog.md
@@ -7,6 +7,8 @@
* `NEW` support completion of `type(o) == ?`
* `CHG` now I think it's a bad idea as it took me nearly an hour to complete the logs started from version `1.0.0`
* `FIX` closing ignored or library file dose not clean diagnostics
+* `FIX` searching of `t.f1` when `t.f1 = t.f2`
+* `FIX` missing signature help of global function
## 1.2.1
`2020-11-27`
diff --git a/script/core/signature.lua b/script/core/signature.lua
index d1fdd246..bd823454 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -81,6 +81,7 @@ local function makeSignatures(call, pos)
local signs = {}
local defs = vm.getDefs(node, 0)
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)
diff --git a/test/signature/init.lua b/test/signature/init.lua
index f06f8193..765e0814 100644
--- a/test/signature/init.lua
+++ b/test/signature/init.lua
@@ -160,3 +160,17 @@ TEST [[
('abc'):format(f($))
]]
(nil)
+
+TEST [[
+function Foo(param01, param02)
+
+end
+
+Foo($)
+]]
+{
+ label = [[
+function Foo(param01: any, param02: any)
+]],
+ arg = {14, 25},
+}