diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-06-11 20:52:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-06-11 20:52:28 +0800 |
commit | 3101cfb948694389cf1cc9cdbba99267f6290508 (patch) | |
tree | f3bd3325af4c64695b7d85a7150ba9c797624206 /test/completion | |
parent | f437ac3594cf56cbd6ce5160a03e716f5192e85e (diff) | |
download | lua-language-server-3101cfb948694389cf1cc9cdbba99267f6290508.zip |
`FIX` Sometimes providing incorrect autocompletion when chaining calls
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index b5ffe173..fc2183d7 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -4462,3 +4462,30 @@ new 'A' { kind = define.CompletionItemKind.Property, } } + +TEST [[ +---@enum(key) enum +local t = { + a = 1, + b = 2, + c = 3, +} + +---@class A +local M + +---@param optional enum +function M:optional(optional) +end + +---@return A +function M:self() + return self +end + +---@type A +local m + +m:self(<??>):optional() +]] +(nil) |