summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-24 17:04:12 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-24 17:04:12 +0800
commitbcd360a954bdf0133dbcd2605e758aeda877ef7e (patch)
tree20aa03c8186070032f7839f7f1705e465deced44 /script/vm
parente6c353e0cf4ea89d5fb27eac4bcae391917faa81 (diff)
downloadlua-language-server-bcd360a954bdf0133dbcd2605e758aeda877ef7e.zip
resolve #621
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/function.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/vm/function.lua b/script/vm/function.lua
index 6c07acf6..9efcbd32 100644
--- a/script/vm/function.lua
+++ b/script/vm/function.lua
@@ -29,6 +29,10 @@ function vm.countParamsOfFunction(func)
local arg = func.args[i]
if arg.type == '...' then
max = math.huge
+ elseif arg.type == 'self'
+ and i == 1 then
+ min = i
+ break
elseif getDocParam(arg)
and not vm.compileNode(arg):isNullable() then
min = i