From bcd360a954bdf0133dbcd2605e758aeda877ef7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 24 Jun 2022 17:04:12 +0800 Subject: resolve #621 --- script/vm/function.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script/vm/function.lua') 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 -- cgit v1.2.3