diff options
author | fesily <fesil@foxmail.com> | 2024-01-17 15:00:54 +0800 |
---|---|---|
committer | fesily <fesil@foxmail.com> | 2024-01-17 15:00:54 +0800 |
commit | 1e51dd0617a9ae55703700550b6db211080a8c13 (patch) | |
tree | da8e68fa128b106a32f0ff28cc393f66f3ac381a /test/completion | |
parent | 4432dfea0fe8390be166b832a1ac416c8228296f (diff) | |
download | lua-language-server-1e51dd0617a9ae55703700550b6db211080a8c13.zip |
doc param support generic pattern
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 90037c27..3ea02ed7 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -4413,3 +4413,24 @@ new 'A' { kind = define.CompletionItemKind.Property, } } + +TEST [[ +---@class namespace.A +---@overload fun(x: {id: string}) + +---@generic T +---@param t namespace.`T` +---@return T +local function new(t) end + +new 'A' { + <??> +} +]] +{ + { + label = 'id', + kind = define.CompletionItemKind.Property, + } +} + |