This commit is contained in:
Felipe Pena 2025-08-04 18:25:32 -03:00
parent 6a17895eea
commit e407862bfd

View file

@ -815,7 +815,7 @@ fn (mut c Checker) builtin_args(mut node ast.CallExpr, fn_name string, func &ast
if !(node.language != .js && node.args[0].expr is ast.CallExpr) {
node.args[0].typ = c.expr(mut node.args[0].expr)
}
mut arg := node.args[0]
arg := node.args[0]
c.check_expr_option_or_result_call(arg.expr, arg.typ)
if arg.typ.is_void() {
c.error('`${fn_name}` can not print void expressions', node.pos)