summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-11-14 16:49:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-11-14 16:49:27 +0800
commit8c1669c85594e245eadfd1dbf1e537349640f2fb (patch)
tree9bacc4f2b1a57e71a21596deecdf58a355676026 /test/completion
parentee590a4cd1bc972ffe19e232b176aa1ffaba2d47 (diff)
downloadlua-language-server-8c1669c85594e245eadfd1dbf1e537349640f2fb.zip
fix type infer in overload
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 7de1c325..90037c27 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -4393,3 +4393,23 @@ f {
kind = define.CompletionItemKind.Property,
},
}
+
+TEST [[
+---@class A
+---@overload fun(x: {id: string})
+
+---@generic T
+---@param t `T`
+---@return T
+local function new(t) end
+
+new 'A' {
+ <??>
+}
+]]
+{
+ {
+ label = 'id',
+ kind = define.CompletionItemKind.Property,
+ }
+}