aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/type.zig
diff options
context:
space:
mode:
authorCarl Åstholm <carl@astholm.se>2024-01-07 15:54:47 +0100
committerCarl Åstholm <carl@astholm.se>2024-01-07 16:27:50 +0100
commit92458094c8f8294d7bb50d28b09dd2c02b03a25e (patch)
treefd046e58c422022b6b293b4b5da6c46698fb4829 /test/behavior/type.zig
parentc8fa767f083e610840cef688b709783c5ad66acc (diff)
downloadzig-92458094c8f8294d7bb50d28b09dd2c02b03a25e.tar.gz
zig-92458094c8f8294d7bb50d28b09dd2c02b03a25e.zip
Fix failing type reifications
Diffstat (limited to 'test/behavior/type.zig')
-rw-r--r--test/behavior/type.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/behavior/type.zig b/test/behavior/type.zig
index 7cb9212c30..1ce31fecfd 100644
--- a/test/behavior/type.zig
+++ b/test/behavior/type.zig
@@ -549,7 +549,7 @@ test "Type.Fn" {
test "reified struct field name from optional payload" {
comptime {
- const m_name: ?[1]u8 = "a".*;
+ const m_name: ?[1:0]u8 = "a".*;
if (m_name) |*name| {
const T = @Type(.{ .Struct = .{
.layout = .Auto,
@@ -711,7 +711,7 @@ test "struct field names sliced at comptime from larger string" {
while (it.next()) |name| {
fields = fields ++ &[_]Type.StructField{.{
.alignment = 0,
- .name = name,
+ .name = name ++ "",
.type = usize,
.default_value = null,
.is_comptime = false,