summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-05 21:10:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-05 21:10:28 +0800
commit81651a70bf8e8e45e829c7a1a2a7d7bd46bb805b (patch)
treed65087b5ef2d72504ebfd289fd2bcc2679464f76 /test
parent2d7927e421b46b6f9103b58cff262205fd0fb7a5 (diff)
downloadlua-language-server-81651a70bf8e8e45e829c7a1a2a7d7bd46bb805b.zip
fix `not-yieldable`
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index cfe29d04..58414b60 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -1461,6 +1461,16 @@ end)
]]
TEST [[
+local function f(...)
+ return ...
+end
+
+f(1, function () ---@async
+ return nil
+end)
+]]
+
+TEST [[
---@nodiscard
local function f()
return 1