diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-22 19:17:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-22 19:17:54 +0800 |
commit | 3981f28e23e1e7f4fb4cf44695490f0ce929a870 (patch) | |
tree | b3eb3ada1708b691e5bb4067c44244a564bdf62b /test/completion/init.lua | |
parent | b6dc9568d47ff4c4612c25ff3a09f62c64b46f70 (diff) | |
download | lua-language-server-3981f28e23e1e7f4fb4cf44695490f0ce929a870.zip |
fix wrong type infer of doc.field
Diffstat (limited to 'test/completion/init.lua')
-rw-r--r-- | test/completion/init.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index fc9233d8..5f79ea21 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2093,3 +2093,25 @@ local s = f() s.$ ]] (EXISTS) + +Cared['description'] = true +TEST [[ +---@class cc +---@field aaa number +---@field bbb number + +---@type cc +local t +print(t.aa$) +]] +{ + { + label = 'aaa', + kind = define.CompletionItemKind.Field, + description = [[ +```lua +field cc.aaa: number +```]] + }, +} +Cared['description'] = nil |