diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-29 21:51:50 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-29 21:51:50 +0800 |
commit | bb56cb2c21bf6a6c7a6c3bf6bb069bc69c1f903c (patch) | |
tree | 294f29bbb03a357838545c42f6ab15ea5ef942c1 /server/test | |
parent | ba5e88985b5344789100b1e8d91b68fe1f2cab1a (diff) | |
download | lua-language-server-bb56cb2c21bf6a6c7a6c3bf6bb069bc69c1f903c.zip |
emmy.arrayType
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/hover/init.lua | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 5e46bf26..485b68a7 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -642,3 +642,52 @@ end [[ local x: *Class {} ]] + +TEST [[ +---@type string[] +local <?x?> +]] +[[ +local x: { + [*integer]: string, +} +]] + +TEST [[ +---@type string[] +local t +local <?x?> = t[1] +]] +[[ +local x: string +]] + +TEST [[ +---@type string[] +local t +for _, <?x?> in ipairs(t) do +end +]] +[[ +local x: string +]] + +TEST [[ +---@type string[] +local t +for _, <?x?> in pairs(t) do +end +]] +[[ +local x: string +]] + +TEST [[ +---@type string[] +local t +for <?k?>, v in pairs(t) do +end +]] +[[ +local k: integer +]] |