mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 00:08:56 +00:00
value: handle slices in canMutateComptimeVarState
This commit is contained in:
parent
33cf6ef621
commit
8f9b31af92
@ -2080,7 +2080,6 @@ fn testReadIntImpl() !void {
|
||||
}
|
||||
|
||||
test "writeIntSlice" {
|
||||
if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
|
||||
try testWriteIntImpl();
|
||||
comptime try testWriteIntImpl();
|
||||
}
|
||||
|
||||
@ -2414,6 +2414,7 @@ pub const Value = extern union {
|
||||
return false;
|
||||
},
|
||||
.@"union" => return val.cast(Payload.Union).?.data.val.canMutateComptimeVarState(),
|
||||
.slice => return val.castTag(.slice).?.data.ptr.canMutateComptimeVarState(),
|
||||
else => return false,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user