diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 22:50:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 22:50:39 +0800 |
commit | f629e481de53bbfac24ebae5c952bb80e3300d47 (patch) | |
tree | 29be92fae9205ffa97dfc6f1b405f67f4017a574 /test/diagnostics | |
parent | 28d5a33077b28dcbb52974aaf90125cee013342b (diff) | |
download | lua-language-server-f629e481de53bbfac24ebae5c952bb80e3300d47.zip |
update
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 56d034b6..ace503ad 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -260,5 +260,19 @@ local t = {} t[5] = nil ]] + +TEST [[ +---@type table<string, true> +local t = {} + +t['x'] = nil +]] + +TEST [[ +local t = { true } + +t[1] = nil +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |