diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 16:15:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 16:15:45 +0800 |
commit | 5cd171f682ec7f80459741c381a7ca52c1ea1aaf (patch) | |
tree | 7ae741641ca66e51ca66fa109d39274ae187e065 /test/diagnostics/init.lua | |
parent | f1ced65b41bd764c9656a9523ddfd3d43aa2cfb1 (diff) | |
download | lua-language-server-5cd171f682ec7f80459741c381a7ca52c1ea1aaf.zip |
check await cross linked callback
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 20 |
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) +]] |