Skip to content

Commit 962293f

Browse files
committed
chore: fix stale doc comments and add defensive guard
1 parent c4ce6f9 commit 962293f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

script/vm/compiler.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,10 +1542,6 @@ local function compileLocal(source)
15421542
end
15431543

15441544
---@param source parser.object
1545-
---Resolves generic type names from a class's generic parameters
1546-
---@param uri uri
1547-
---@param classGlobal vm.global
1548-
---@param typeName string
15491545
---@param mfunc parser.object
15501546
---@param index integer
15511547
---@param args parser.object[]
@@ -1572,7 +1568,7 @@ local function bindReturnOfFunction(source, mfunc, index, args)
15721568
if receiver then
15731569
local receiverNode = vm.compileNode(receiver)
15741570
for rn in receiverNode:eachObject() do
1575-
if rn.type == 'doc.type.sign' and rn.signs and rn.node then
1571+
if rn.type == 'doc.type.sign' and rn.signs and rn.node and rn.node[1] then
15761572
local classGlobal = vm.getGlobal('type', rn.node[1])
15771573
if classGlobal then
15781574
-- Build a map of class generic param names to their concrete types

0 commit comments

Comments
 (0)