Skip to content

Commit 828d0a5

Browse files
committed
fix a specific case for getVisibleType
1 parent 4670739 commit 828d0a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/vm/visible.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,14 @@ function vm.getParentClass(source)
9696
if source.type == 'setfield'
9797
or source.type == 'setindex'
9898
or source.type == 'setmethod'
99-
or source.type == 'tablefield'
10099
or source.type == 'tableindex' then
101100
return vm.getDefinedClass(guide.getUri(source), source.node)
102101
end
102+
103+
if source.type == 'tablefield' then
104+
return vm.getDefinedClass(guide.getUri(source), source.node) or
105+
vm.getDefinedClass(guide.getUri(source), source.parent.parent)
106+
end
103107
return nil
104108
end
105109

0 commit comments

Comments
 (0)