test cases: array inside of anonymous struct

Closes #7525
This commit is contained in:
r00ster91 2023-05-28 03:03:31 +02:00
parent 10218dd096
commit 5e9fe84d24

View File

@ -0,0 +1,21 @@
const std = @import("std");
noinline fn outer() u32 {
var a: u32 = 42;
return inner(.{
.unused = a,
.value = [1]u32{0},
});
}
noinline fn inner(args: anytype) u32 {
return args.value[0];
}
pub fn main() !void {
try std.testing.expect(outer() == 0);
}
// run
// backend=llvm
// target=native