diff options
author | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 17:22:00 +0800 |
---|---|---|
committer | unknown <sumnekosun@intranet.123u.com> | 2019-04-02 17:22:00 +0800 |
commit | 9ed812cd894a59e709a45bbbc9c5b5149ae7c2bb (patch) | |
tree | 2987e74db9136397ebfa14923cf7fcd8686a8526 /server | |
parent | d283727cffff43312e5129801e265c2957d507d6 (diff) | |
download | lua-language-server-9ed812cd894a59e709a45bbbc9c5b5149ae7c2bb.zip |
修正 function a.b 没有自动完成的bug
Diffstat (limited to 'server')
-rw-r--r-- | server/src/vm/vm.lua | 2 | ||||
-rw-r--r-- | server/test/completion/init.lua | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index a26fe808..02ced843 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -879,6 +879,7 @@ function mt:doFunction(action) local value = self:buildFunction(action) local source = name[#name] self:instantSource(source) + source:set('simple', name) source:set('parent', parent) source:set('object', parent) if source.type == 'index' then @@ -908,6 +909,7 @@ function mt:doFunction(action) local value = self:buildFunction(action) local source = name[#name] self:instantSource(source) + source:set('simple', name) source:set('parent', parent) if source.type == 'index' then local index = self:getIndex(source) diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index a512ee5e..b34d567d 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -726,3 +726,8 @@ end kind = CompletionItemKind.Variable, }, } + +TEST [[ +function table.i@ +]] +(EXISTS) |