diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-29 02:27:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-29 02:27:13 +0800 |
commit | 4190a3e8ebd0ff1408fc47927394970de952f18c (patch) | |
tree | 46d4ef193af05ef864a839135e990f6f5f5b2810 /script/vm/function.lua | |
parent | 87288efc77c68be375d6c534109f734f2cc99df9 (diff) | |
download | lua-language-server-4190a3e8ebd0ff1408fc47927394970de952f18c.zip |
fix runtime errors reported by telemetry
Diffstat (limited to 'script/vm/function.lua')
-rw-r--r-- | script/vm/function.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/script/vm/function.lua b/script/vm/function.lua index 0e04408c..f64b2262 100644 --- a/script/vm/function.lua +++ b/script/vm/function.lua @@ -148,7 +148,7 @@ end ---@return integer min ---@return number max function vm.countReturnsOfCall(func, args, mark) - local funcs = vm.getMatchedFunctions(func, args) + local funcs = vm.getMatchedFunctions(func, args, mark) ---@type integer? local min ---@type number? @@ -197,8 +197,9 @@ end ---@param func parser.object ---@param args parser.object[]? +---@param mark? table ---@return parser.object[] -function vm.getMatchedFunctions(func, args) +function vm.getMatchedFunctions(func, args, mark) local funcs = {} local node = vm.compileNode(func) for n in node:eachObject() do @@ -211,7 +212,7 @@ function vm.getMatchedFunctions(func, args) return funcs end - local amin, amax = vm.countList(args) + local amin, amax = vm.countList(args, mark) local matched = {} for _, n in ipairs(funcs) do |