mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
525dcaecba
Also fix C warnings triggered by these tests.
24 lines
406 B
Zig
24 lines
406 B
Zig
const builtin = @import("builtin");
|
|
|
|
test "const inferred array of slices" {
|
|
const T = struct { v: bool };
|
|
|
|
const decls = [_][]const T{
|
|
&[_]T{
|
|
.{ .v = false },
|
|
},
|
|
};
|
|
_ = decls;
|
|
}
|
|
|
|
test "var inferred array of slices" {
|
|
const T = struct { v: bool };
|
|
|
|
var decls = [_][]const T{
|
|
&[_]T{
|
|
.{ .v = false },
|
|
},
|
|
};
|
|
_ = decls;
|
|
}
|