summaryrefslogtreecommitdiff
path: root/test/diagnostics/common.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-22 01:49:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-22 01:49:34 +0800
commit2b499cb652e9ad6b60c85a491aebeb84f2f8941a (patch)
tree974649378f77c619aafc2f10cf78fdc9811c345e /test/diagnostics/common.lua
parent7b3e7f4b0a62b7c9c3b895e89b4fe79bb8f350ba (diff)
downloadlua-language-server-2b499cb652e9ad6b60c85a491aebeb84f2f8941a.zip
improve one case
Diffstat (limited to 'test/diagnostics/common.lua')
-rw-r--r--test/diagnostics/common.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index d640e45a..7d745039 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1631,3 +1631,27 @@ function F(x) end
F(k())
]]
+
+TEST [[
+local function f()
+ return 1, 2, 3
+end
+
+local function k()
+end
+
+k(<!f()!>)
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+local function f()
+ return 1, 2, 3
+end
+
+---@param x integer
+local function k(x)
+end
+
+k(f())
+]]