IR: port more tests

This commit is contained in:
Andrew Kelley
2016-12-22 01:42:30 -05:00
parent 5a71718757
commit dab3ddab45
13 changed files with 286 additions and 284 deletions

View File

@@ -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;