zig/test/behavior/bugs/7027.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

18 lines
324 B
Zig

const Foobar = struct {
myTypes: [128]type,
str: [1024]u8,
fn foo() @This() {
comptime var foobar: Foobar = undefined;
foobar.str = [_]u8{'a'} ** 1024;
return foobar;
}
};
fn foo(arg: anytype) void {}
test "" {
comptime var foobar = Foobar.foo();
foo(foobar.str[0..10]);
}