2024-11-16 19:02:49 +00:00
|
|
|
#target=x86_64-linux-selfhosted
|
2024-11-11 12:05:38 +00:00
|
|
|
#target=x86_64-linux-cbe
|
|
|
|
#target=x86_64-windows-cbe
|
|
|
|
#update=initial version
|
|
|
|
#file=main.zig
|
|
|
|
pub fn main() !void {
|
|
|
|
try foo(false);
|
|
|
|
}
|
|
|
|
fn foo(recurse: bool) !void {
|
|
|
|
const stdout = std.io.getStdOut().writer();
|
|
|
|
if (recurse) return foo(true);
|
|
|
|
try stdout.writeAll("non-recursive path\n");
|
|
|
|
}
|
|
|
|
const std = @import("std");
|
|
|
|
#expect_stdout="non-recursive path\n"
|
|
|
|
|
|
|
|
#update=eliminate recursion and change argument
|
|
|
|
#file=main.zig
|
|
|
|
pub fn main() !void {
|
|
|
|
try foo(true);
|
|
|
|
}
|
|
|
|
fn foo(recurse: bool) !void {
|
|
|
|
const stdout = std.io.getStdOut().writer();
|
|
|
|
if (recurse) return stdout.writeAll("x==1\n");
|
|
|
|
try stdout.writeAll("non-recursive path\n");
|
|
|
|
}
|
|
|
|
const std = @import("std");
|
|
|
|
#expect_stdout="x==1\n"
|