typst-0.1.0.0: test/typ/compiler/return-04.typ
// Test that the expression is evaluated to the end.
#let sum(..args) = {
let s = 0
for v in args.pos() {
s += v
}
s
}
#let f() = {
sum(..return, 1, 2, 3)
"nope"
}
#test(f(), 6)
// Test that the expression is evaluated to the end.
#let sum(..args) = {
let s = 0
for v in args.pos() {
s += v
}
s
}
#let f() = {
sum(..return, 1, 2, 3)
"nope"
}
#test(f(), 6)