aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-02 16:05:12 -0400
committerGitHub <noreply@github.com>2021-10-02 16:05:12 -0400
commit468ed7ada50c743eabe01b36d0ee9f090d80e00a (patch)
treefc5a703aaf6211db25355fcf79a945696564f3df /test/behavior
parent05d36fce9c7fde223e6657b3dc47105fbf065695 (diff)
parent83dcd9f0386a6bd70cf8d7dee3892f3b8d31d506 (diff)
downloadzig-468ed7ada50c743eabe01b36d0ee9f090d80e00a.tar.gz
zig-468ed7ada50c743eabe01b36d0ee9f090d80e00a.zip
Merge pull request #9875 from g-w1/timestimes
stage2: emit Value.repeated for `**` with array len 1
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/array.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig
index 8250cdea06..9c7282f0f2 100644
--- a/test/behavior/array.zig
+++ b/test/behavior/array.zig
@@ -32,4 +32,9 @@ 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"));
+
+ // this should cause a Value.repeated to be emitted in AIR.
+ // TODO: find a way to test that this is actually getting emmited
+ var j: [4]u8 = [1]u8{'a'} ** 4;
+ try expect(std.mem.eql(u8, &j, "aaaa"));
}