diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-12 04:23:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-12 04:23:27 +0800 |
commit | 6e47a81bc1c43a6188e17d3d77bbc88b7932269c (patch) | |
tree | 2886ba7d33131c70b8a572cfccd03cda105299f0 /test | |
parent | e6e46580d171ebe4a3feb390652f1cf42faeac9a (diff) | |
download | lua-language-server-6e47a81bc1c43a6188e17d3d77bbc88b7932269c.zip |
fix get table key
`table<string, boolean>[string] -> boolean`
Diffstat (limited to 'test')
-rw-r--r-- | test/hover/init.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index d4160dfa..199df06d 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1576,7 +1576,7 @@ local x: unknown ]] TEST [[ ----@type any +---@type unknown local <?t?> t.a = 1 ]] diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index d199f79b..fd6e464f 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1439,3 +1439,15 @@ TEST '(string|integer)[]' [[ ---@type (string|integer)[] local <?x?> ]] + +TEST 'boolean' [[ +---@type table<string, boolean> +local t + +---@alias uri string + +---@type string +local uri + +local <?v?> = t[uri] +]] |