diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-20 00:33:51 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-20 16:17:16 -0700 |
| commit | e86ff712a666ab5be54fa763cc12a5f245718117 (patch) | |
| tree | 90166386cac32112afbb0c087453cf22938a2702 /test/behavior/array_llvm.zig | |
| parent | eb70f6e8d7f4c1a735fe25de368f6d5459cba16c (diff) | |
| download | zig-e86ff712a666ab5be54fa763cc12a5f245718117.tar.gz zig-e86ff712a666ab5be54fa763cc12a5f245718117.zip | |
stage2: implement tuples
* AIR instruction vector_init gains the ability to init arrays and
tuples in addition to vectors. This will probably also gain the
ability to initialize structs and be renamed to `aggregate_init`.
* AstGen prefers to use an `anon_array_init` ZIR instruction for
local variables when the init expr is an array literal and there is
no type.
Diffstat (limited to 'test/behavior/array_llvm.zig')
| -rw-r--r-- | test/behavior/array_llvm.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/behavior/array_llvm.zig b/test/behavior/array_llvm.zig index e74c0ea443..5be5974fff 100644 --- a/test/behavior/array_llvm.zig +++ b/test/behavior/array_llvm.zig @@ -237,8 +237,6 @@ test "zero-sized array with recursive type definition" { } test "type coercion of anon struct literal to array" { - if (@import("builtin").zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO - const S = struct { const U = union { a: u32, @@ -254,6 +252,8 @@ test "type coercion of anon struct literal to array" { try expect(arr1[1] == 56); try expect(arr1[2] == 54); + if (@import("builtin").zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO + var x2: U = .{ .a = 42 }; const t2 = .{ x2, .{ .b = true }, .{ .c = "hello" } }; var arr2: [3]U = t2; |
