diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-22 01:42:30 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-22 01:42:30 -0500 |
| commit | dab3ddab4539b79b1dee4bc82f78c1b3f41ffeb2 (patch) | |
| tree | b792312c1cf2025041a3370fc9b59b91ff53c9c0 /test/cases3/array.zig | |
| parent | 5a717187571e5eed99087a9b4359f6ac194db1cf (diff) | |
| download | zig-dab3ddab4539b79b1dee4bc82f78c1b3f41ffeb2.tar.gz zig-dab3ddab4539b79b1dee4bc82f78c1b3f41ffeb2.zip | |
IR: port more tests
Diffstat (limited to 'test/cases3/array.zig')
| -rw-r--r-- | test/cases3/array.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/cases3/array.zig b/test/cases3/array.zig index 3ae53c7734..d27b611a9d 100644 --- a/test/cases3/array.zig +++ b/test/cases3/array.zig @@ -43,6 +43,18 @@ fn arrayLiteral() { assert(hex_mult[1] == 256); } +fn arrayDotLenConstExpr() { + @setFnTest(this); + + assert(@staticEval(some_array.len) == 4); +} + +const ArrayDotLenConstExpr = struct { + y: [some_array.len]u8, +}; +const some_array = []u8 {0, 1, 2, 3}; + + // TODO const assert = @import("std").debug.assert; |
