diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-04 16:29:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-04 16:29:26 -0400 |
| commit | 43db697b46e362e5991005f6c7b8b16ddc9bddbb (patch) | |
| tree | e53320c89cff35f60a1e11e57a0c938f0b793021 /test/behavior | |
| parent | e498fb155051f548071da1a13098b8793f527275 (diff) | |
| parent | 50a6b0f3acb2a17f74d57301dbf3d4b13e30953b (diff) | |
| download | zig-43db697b46e362e5991005f6c7b8b16ddc9bddbb.tar.gz zig-43db697b46e362e5991005f6c7b8b16ddc9bddbb.zip | |
Merge pull request #11789 from Vexu/stage2
Stage2 fixes towards `zig2 build test-std` working
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/array.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig index 93de42df67..bccff1edf0 100644 --- a/test/behavior/array.zig +++ b/test/behavior/array.zig @@ -573,3 +573,12 @@ test "type coercion of pointer to anon struct literal to pointer to array" { try S.doTheTest(); comptime try S.doTheTest(); } + +test "array with comptime only element type" { + const a = [_]type{ + u32, + i32, + }; + try testing.expect(a[0] == u32); + try testing.expect(a[1] == i32); +} |
