diff options
| author | g-w1 <58830309+g-w1@users.noreply.github.com> | 2021-09-30 18:31:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-30 18:31:27 -0400 |
| commit | 5e7406bdd9f942900dceb2f917ed5f64b6f2ba00 (patch) | |
| tree | d1f4ddd3955406d617531156bc6e3721a908acc7 /test/behavior/array.zig | |
| parent | c82c3585c8fdf02820747c118c78957e2eb5d072 (diff) | |
| download | zig-5e7406bdd9f942900dceb2f917ed5f64b6f2ba00.tar.gz zig-5e7406bdd9f942900dceb2f917ed5f64b6f2ba00.zip | |
stage2: implement array_init instruction (#9843)
* stage2: array mul support more types of operands
* stage2: array cat support more types of operands
* print_zir: print array_init
* stage2: implement Sema for array_init
Diffstat (limited to 'test/behavior/array.zig')
| -rw-r--r-- | test/behavior/array.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig index 8cf0042d5f..8250cdea06 100644 --- a/test/behavior/array.zig +++ b/test/behavior/array.zig @@ -27,3 +27,9 @@ test "arrays" { fn getArrayLen(a: []const u32) usize { return a.len; } + +test "array init with mult" { + const a = 'a'; + var i: [8]u8 = [2]u8{ a, 'b' } ** 4; + try expect(std.mem.eql(u8, &i, "abababab")); +} |
