summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-05 17:13:36 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-05 17:13:36 +0800
commitd6778d10edb8bf47a854098456421f746606996b (patch)
treef1a0962e52f1ff87af5efbff7772c195352d94f2 /script/core
parent32301f8de3d832d428bf75fe44269ed121f4ab4f (diff)
downloadlua-language-server-d6778d10edb8bf47a854098456421f746606996b.zip
fix
Diffstat (limited to 'script/core')
-rw-r--r--script/core/diagnostics/not-yieldable.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/not-yieldable.lua b/script/core/diagnostics/not-yieldable.lua
index 612b5b98..465f6a8b 100644
--- a/script/core/diagnostics/not-yieldable.lua
+++ b/script/core/diagnostics/not-yieldable.lua
@@ -13,7 +13,8 @@ local function isYieldAble(defs, i)
local arg = def.args and def.args[i]
if arg then
if infer.hasType(arg, 'any')
- or vm.isAsync(arg, true) then
+ or vm.isAsync(arg, true)
+ or arg.type == '...' then
return true
end
end