//ww:run-exit 0 // Run leg of the retired 926_tagged_sret_run.c row wide_local_roundtrip. package main; type oops = !str; type nomem = !void; type wide = struct { xs: []u8, ys: []u8, n: i64 }; fn mk(b: []u8, n: i64) (wide | oops | nomem) = { let w: wide = wide { xs = b, ys = b, n = n }; return w; }; export fn main() i32 = { let buf: [4]u8 = [1u8, 2u8, 3u8, 4u8]; let r: (wide | oops | nomem) = mk(buf[0:4], 7); match (r) { case let w: wide => { if (w.n != 7) { return 1; }; if (w.ys[0] != 1u8) { return 2; }; }; case let e: oops => return 13; case nomem => return 14; }; return 0; };