diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-25 00:19:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-25 00:19:56 +0800 |
commit | a90a48c328045dd3f89da78a77f977ceb2cc7ae0 (patch) | |
tree | 26c55555aa74f32690bf8de9fa7d029c4cdd191e /test/completion | |
parent | e9fa0071308c95d2d68bca410c4b12cbcab50e1f (diff) | |
download | lua-language-server-a90a48c328045dd3f89da78a77f977ceb2cc7ae0.zip |
completion checks visible
#1316
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index cc164d3a..bf43a463 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3904,3 +3904,62 @@ t.fff<??> kind = define.CompletionItemKind.Function, }, } + +TEST [[ +---@class A +---@field private x number +---@field y number + +---@type A +local t + +t.<??> +]] +{ + { + label = 'y', + kind = define.CompletionItemKind.Field, + }, +} + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field z number + +---@class B: A +local t + +t.<??> +]] +{ + { + label = 'y', + kind = define.CompletionItemKind.Field, + }, + { + label = 'z', + kind = define.CompletionItemKind.Field, + }, +} + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field z number + +---@class B: A + +---@type B +local t + +t.<??> +]] +{ + { + label = 'z', + kind = define.CompletionItemKind.Field, + }, +} |