summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-12 16:28:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-12 16:28:49 +0800
commit84cd1c05f26842c2ae72238ec5d68bba8464ef4d (patch)
treed1b49e150d6bbade44c48809bbad26d22b40415b /test
parentc7c1249dc0b30fa47dc8b8f12a9bb8a8995cfa6c (diff)
downloadlua-language-server-84cd1c05f26842c2ae72238ec5d68bba8464ef4d.zip
fix
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/type-check.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index 243b69ff..36de70e0 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -701,5 +701,18 @@ local t
<!t!> = 'xxx'
]]
+TEST [[
+---@param b boolean
+local function f(b)
+end
+
+---@type boolean
+local t
+
+if t then
+ f(t)
+end
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')