diff options
author | NeOzay <colpaert.benoit@gmail.com> | 2024-07-13 16:42:33 +0200 |
---|---|---|
committer | NeOzay <colpaert.benoit@gmail.com> | 2024-07-13 16:42:33 +0200 |
commit | 828d0a5c4a4acdad8397d6b7576b45947484ceb7 (patch) | |
tree | a496487584e170807a09687a72fe4d292fa2cb3e | |
parent | 46707395df3255808682fdac883f7d86c1ac9a78 (diff) | |
download | lua-language-server-828d0a5c4a4acdad8397d6b7576b45947484ceb7.zip |
fix a specific case for getVisibleType
-rw-r--r-- | script/vm/visible.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/vm/visible.lua b/script/vm/visible.lua index 0f486d6b..fddb7faf 100644 --- a/script/vm/visible.lua +++ b/script/vm/visible.lua @@ -96,10 +96,14 @@ function vm.getParentClass(source) if source.type == 'setfield' or source.type == 'setindex' or source.type == 'setmethod' - or source.type == 'tablefield' or source.type == 'tableindex' then return vm.getDefinedClass(guide.getUri(source), source.node) end + + if source.type == 'tablefield' then + return vm.getDefinedClass(guide.getUri(source), source.node) or + vm.getDefinedClass(guide.getUri(source), source.parent.parent) + end return nil end |