summaryrefslogtreecommitdiff
path: root/test/diagnostics/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-03 16:15:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-03 16:15:45 +0800
commit5cd171f682ec7f80459741c381a7ca52c1ea1aaf (patch)
tree7ae741641ca66e51ca66fa109d39274ae187e065 /test/diagnostics/init.lua
parentf1ced65b41bd764c9656a9523ddfd3d43aa2cfb1 (diff)
downloadlua-language-server-5cd171f682ec7f80459741c381a7ca52c1ea1aaf.zip
check await cross linked callback
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r--test/diagnostics/init.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index a46a6dd7..57c28bbb 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -1388,3 +1388,23 @@ function F()
f()
end
]]
+
+TEST [[
+local function f(cb)
+ cb()
+end
+
+<!f!>(function () ---@async
+ return nil
+end)
+]]
+
+TEST [[
+local function f(cb)
+ pcall(cb)
+end
+
+<!f!>(function () ---@async
+ return nil
+end)
+]]