summaryrefslogtreecommitdiff
path: root/test/diagnostics/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-03 17:29:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-03 17:29:18 +0800
commit7b76328600dd9bc5206f38a549da9e4f99c9ff84 (patch)
tree979dccdcb4c29a2f8e57f0730c0ff58b827b1af8 /test/diagnostics/init.lua
parented6011c30754bfaa646f5a9a819f20f1f32cbfba (diff)
downloadlua-language-server-7b76328600dd9bc5206f38a549da9e4f99c9ff84.zip
#687 `---@nodiscard`
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r--test/diagnostics/init.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index 57c28bbb..d1d0f68f 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -1408,3 +1408,22 @@ end
return nil
end)
]]
+
+TEST [[
+---@nodiscard
+local function f()
+ return 1
+end
+
+<!f()!>
+]]
+
+
+TEST [[
+---@nodiscard
+local function f()
+ return 1
+end
+
+X = f()
+]]