diff options
author | jharajeev55 <jharajeev55@gmail.com> | 2023-03-02 10:26:33 +0530 |
---|---|---|
committer | jharajeev55 <jharajeev55@gmail.com> | 2023-03-02 10:26:33 +0530 |
commit | e5a99c3cdd7d79347bb6c3d2cfc474ddda106717 (patch) | |
tree | 2362d74361e2a50f81b3d98a849764e1c97808ee /test | |
parent | 677fac00286628af29a1a24c11a0d6de7d8afe0d (diff) | |
download | lua-language-server-e5a99c3cdd7d79347bb6c3d2cfc474ddda106717.zip |
Array of a class type does not get completion #1940
https: //github.com/LuaLS/lua-language-server/issues/1940
Co-Authored-By: esarver <4965633+esarver@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/crossfile/completion.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua index d613f621..113b0327 100644 --- a/test/crossfile/completion.lua +++ b/test/crossfile/completion.lua @@ -127,6 +127,37 @@ end TEST { { path = 'abc.lua', + content = [[ + ---@meta + + ---@class A + ---@field f1 integer + ---@field f2 boolean + + ---@type A[] + X = {} +]], + }, + { + path = 'test.lua', + content = [[ X[1].<??>]], + main = true, + }, + completion = { + { + label = 'f1', + kind = CompletionItemKind.Field, + }, + { + label = 'f2', + kind = CompletionItemKind.Field, + }, + } +} + +TEST { + { + path = 'abc.lua', content = '', }, { |