Skip to content

Commit 6ff1c19

Browse files
Handle empty return types in visitors.tl
1 parent accd44b commit 6ff1c19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

teal/check/visitors.tl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,9 @@ visit_node.cbs = {
17061706
node.args[i].expected = t
17071707
end
17081708
end
1709+
if not node.rets or #node.rets == 0 then
1710+
node.rets = expected.rets
1711+
end
17091712
end
17101713
end,
17111714
before_statements = function(self: Context, node: Node, children: {Type})

0 commit comments

Comments
 (0)