diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-25 15:30:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-25 15:30:58 +0800 |
commit | cd6ac072254b8583a4b8d7f8a973977b7f054766 (patch) | |
tree | 723b1da2ce276235df949ee23a988c3cc669f700 /test/hover | |
parent | bf9828d40bd2c7803866138a925b9326ddc2cef3 (diff) | |
download | lua-language-server-cd6ac072254b8583a4b8d7f8a973977b7f054766.zip |
improve hover of `table<K, V>`
Diffstat (limited to 'test/hover')
-rw-r--r-- | test/hover/init.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index 0cfb501b..52d31416 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1538,3 +1538,18 @@ local u: number { x: any, } ]] + +TEST [[ +---@generic K, V +---@param t table<K, V> +---@return K +---@return V +local function next(t) end + +---@type table<string, boolean> +local t +local k, v = next(<?t?>) +]] +[[ +local t: table<string, boolean> +]] |