summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-15 20:45:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-15 20:45:49 +0800
commitf40f0a54b1b8ccb97bc30d21d16d4f212b178ada (patch)
tree6315dd1cf40615ffd040ede8e1f8957c3ace47ff /test/diagnostics
parentfde5288aa33c1deadc0724cb2e9df2b628a310c6 (diff)
downloadlua-language-server-f40f0a54b1b8ccb97bc30d21d16d4f212b178ada.zip
`need-check-nil` check `t[x]`
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index f41102ed..428d8a45 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1561,6 +1561,14 @@ S = <!x!>()
]]
TEST [[
+---@type integer?
+local x
+
+T = {}
+T[<!x!>] = 1
+]]
+
+TEST [[
local x, y
local z = x and y