Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Sep 4, 2023
1 parent 4f62a2c commit 8b950e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9371,7 +9371,7 @@ tl.type_check = function(ast, opts)
end

if #children[1] > nrets and (not lax) and not vatype then
node_error(node, "in " .. what .. ": excess return values, expected " .. #rets .. " %s, got " .. #children[1] .. " %s", rets, children[1])
node_error(node, what .. ": excess return values, expected " .. #rets .. " %s, got " .. #children[1] .. " %s", rets, children[1])
end

if nrets > 1 and
Expand Down
2 changes: 1 addition & 1 deletion tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -9371,7 +9371,7 @@ tl.type_check = function(ast: Node, opts: TypeCheckOptions): Result, string
end

if #children[1] > nrets and (not lax) and not vatype then
node_error(node, "in " .. what ..": excess return values, expected " .. #rets .. " %s, got " .. #children[1] .. " %s", rets, children[1])
node_error(node, what ..": excess return values, expected " .. #rets .. " %s, got " .. #children[1] .. " %s", rets, children[1])
end

if nrets > 1
Expand Down

0 comments on commit 8b950e3

Please sign in to comment.