summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-20 23:26:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-20 23:26:07 +0800
commit7221cc92acd0099ed28727536c30d264b3cb7bcc (patch)
tree248793ddd9f92730c1cf4ecc897c3d8100571c65 /test
parent4084590d028ba9b57cbdc82591ba52e895d1271e (diff)
downloadlua-language-server-7221cc92acd0099ed28727536c30d264b3cb7bcc.zip
resolve #1211
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/type-check.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index ace503ad..9dda3333 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -274,5 +274,14 @@ local t = { true }
t[1] = nil
]]
+TEST [[
+---@class A
+local t = {
+ x = 1
+}
+
+<!t.x!> = true
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')