mirror of
https://github.com/ziglang/zig.git
synced 2026-01-11 09:55:12 +00:00
Sema: fix false negative Value.isComptimePtr for slices
This commit is contained in:
parent
624c3069b4
commit
6931f6c5be
@ -575,7 +575,7 @@ const mnemonic_to_encodings_map = init: {
|
||||
.modrm_ext = entry[4],
|
||||
.mode = entry[5],
|
||||
};
|
||||
// TODO: use `@memcpy` for these. When I did that, I got an false positive
|
||||
// TODO: use `@memcpy` for these. When I did that, I got a false positive
|
||||
// compile error for this copy happening at compile time.
|
||||
std.mem.copyForwards(Op, &data.ops, entry[2]);
|
||||
std.mem.copyForwards(u8, &data.opc, entry[3]);
|
||||
|
||||
@ -2789,6 +2789,7 @@ pub const Value = extern union {
|
||||
.field_ptr => isComptimeMutablePtr(val.castTag(.field_ptr).?.data.container_ptr),
|
||||
.eu_payload_ptr => isComptimeMutablePtr(val.castTag(.eu_payload_ptr).?.data.container_ptr),
|
||||
.opt_payload_ptr => isComptimeMutablePtr(val.castTag(.opt_payload_ptr).?.data.container_ptr),
|
||||
.slice => isComptimeMutablePtr(val.castTag(.slice).?.data.ptr),
|
||||
|
||||
else => false,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user