aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/array.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behavior/array.zig')
-rw-r--r--test/behavior/array.zig9
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);
+}