summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-29 11:13:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-29 11:13:07 +0800
commitf7905e759ec7be0188b7f237eeb531bc111695af (patch)
tree3506acfffc7d10307457629725bec2b09accf81e /script
parent265e5f81721c29d4351b5b6bffea612d31354ed4 (diff)
downloadlua-language-server-f7905e759ec7be0188b7f237eeb531bc111695af.zip
#450 fix generic from method call
Diffstat (limited to 'script')
-rw-r--r--script/core/guide.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/core/guide.lua b/script/core/guide.lua
index 9c0fac76..e23fbf0e 100644
--- a/script/core/guide.lua
+++ b/script/core/guide.lua
@@ -1429,6 +1429,16 @@ function m.getCallValue(source)
or call.node.special == 'xpcall' then
return call.args and call.args[1], call.args, index - 1
end
+ if call.node.type == 'getmethod' then
+ local args = {}
+ args[1] = call.node.node
+ if call.args then
+ for _, arg in ipairs(call.args) do
+ args[#args+1] = arg
+ end
+ end
+ return call.node, args, index
+ end
return call.node, call.args, index
end