lib+test: fmt rename fprint→fdprint; add io.stream fprint sink
This commit is contained in:
@@ -1639,7 +1639,7 @@ static const struct row rows[] = {
|
||||
"fn main() i32 = { return sumtag(1i64, \"hi\", true): i32; };", 42 },
|
||||
/* Variadic forwarding: `wrap(args...)` passes the local slice
|
||||
* directly to `sum`, no re-gather. Mirrors Hare's wrapper shape
|
||||
* (`fn println(args: formattable...) = fprintln(os.stdout, args...)`). */
|
||||
* (`fn println(args: formattable...) = fdprintln(os.stdout, args...)`). */
|
||||
{ "fn sum(args: i64...) i64 = {\n"
|
||||
" let s: i64 = 0i64;\n"
|
||||
" let i: i32 = 0;\n"
|
||||
@@ -1654,8 +1654,8 @@ static const struct row rows[] = {
|
||||
"};", 42 },
|
||||
/* lib/fmt user-side: `fmt.println(args: formattable...)` gathers
|
||||
* mixed-type args at the call site. End-to-end exercises the
|
||||
* lib/fmt graduation: the wrapper-chain `println → fprintln →
|
||||
* fprint` is itself variadic-forwarding, so this validates both
|
||||
* lib/fmt graduation: the wrapper-chain `println → fdprintln →
|
||||
* fdprint` is itself variadic-forwarding, so this validates both
|
||||
* gather (at main) and `args...` forward (inside lib/fmt). The
|
||||
* exit code is bytes printed (`hello 7\n` = 8). */
|
||||
{ "use fmt;\n"
|
||||
|
||||
Reference in New Issue
Block a user