summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-08 16:44:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-08 16:44:04 +0800
commit96946f4022a45519fa4e512c652d322cf8232a73 (patch)
treeeb458535c95d461c4ca522a1d757762cbbff9970 /script/core
parent8356a0494c0ec696b7017406e1c06b4277f6acbd (diff)
downloadlua-language-server-96946f4022a45519fa4e512c652d322cf8232a73.zip
yieldable check linked
Diffstat (limited to 'script/core')
-rw-r--r--script/core/diagnostics/not-yieldable.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/core/diagnostics/not-yieldable.lua b/script/core/diagnostics/not-yieldable.lua
index ed853380..0be92e82 100644
--- a/script/core/diagnostics/not-yieldable.lua
+++ b/script/core/diagnostics/not-yieldable.lua
@@ -43,10 +43,11 @@ return function (uri, callback)
end
for i, arg in ipairs(source.args) do
if vm.isAsync(arg, true)
+ and not vm.isLinkedCall(source.node, i)
and not isYieldAble(defs, i) then
callback {
- start = source.node.start,
- finish = source.node.finish,
+ start = arg.start,
+ finish = arg.finish,
message = lang.script('DIAG_NOT_YIELDABLE', i),
}
end