Skip to content

Commit 618ec82

Browse files
committed
fix: missing field completion for generic class object
1 parent 06943cf commit 618ec82

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

script/vm/compiler.lua

+11
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,17 @@ local searchFieldSwitch = util.switch()
304304
end
305305
end
306306
end)
307+
: case 'doc.type.sign'
308+
: call(function (suri, source, key, pushResult)
309+
if not source.node[1] then
310+
return
311+
end
312+
local global = vm.getGlobal('type', source.node[1])
313+
if not global then
314+
return
315+
end
316+
vm.getClassFields(suri, global, key, pushResult)
317+
end)
307318
: case 'global'
308319
: call(function (suri, node, key, pushResult)
309320
if node.cate == 'variable' then

0 commit comments

Comments
 (0)