summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-21 16:23:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-21 16:23:51 +0800
commit8f4f9a7122168ba3944ec4fa791b94c8eff8750f (patch)
tree8212d56e4cb9de529ff59b1c65f57d07d305d3c3 /test
parentc32bbad6aa97fafe98a76bb387ab0a687ebcd38e (diff)
downloadlua-language-server-8f4f9a7122168ba3944ec4fa791b94c8eff8750f.zip
update
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/type-check.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index 9dda3333..cbf9265c 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -283,5 +283,22 @@ local t = {
<!t.x!> = true
]]
+TEST [[
+---@type number
+local t
+
+t = 1
+]]
+
+TEST [[
+---@type number
+local t
+
+---@type integer
+local y
+
+t = y
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')