diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-01-19 18:44:09 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-01-22 00:12:37 +0200 |
| commit | 5f5ab491684f0f5dd235189416f9c3d85e8e9be0 (patch) | |
| tree | 51d450c61c1ece9b6208d0904ab306f660502251 /src/type.zig | |
| parent | a492a607d5410b1136db3a63fabd01c10827144c (diff) | |
| download | zig-5f5ab491684f0f5dd235189416f9c3d85e8e9be0.tar.gz zig-5f5ab491684f0f5dd235189416f9c3d85e8e9be0.zip | |
Value: implement `compareAllWithZero` for `bytes` and `str_lit`
Closes #10692
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/type.zig b/src/type.zig index dd4be91937..c675cd225d 100644 --- a/src/type.zig +++ b/src/type.zig @@ -5533,7 +5533,7 @@ pub const Type = extern union { } const S = struct { fn fieldWithRange(int_ty: Type, int_val: Value, end: usize, m: *Module) ?usize { - if (int_val.compareAllWithZero(.lt)) return null; + if (int_val.compareAllWithZero(.lt, m)) return null; var end_payload: Value.Payload.U64 = .{ .base = .{ .tag = .int_u64 }, .data = end, @@ -6556,12 +6556,12 @@ pub const Type = extern union { if (!d.mutable and d.pointee_type.eql(Type.u8, mod)) { switch (d.size) { .Slice => { - if (sent.compareAllWithZero(.eq)) { + if (sent.compareAllWithZero(.eq, mod)) { return Type.initTag(.const_slice_u8_sentinel_0); } }, .Many => { - if (sent.compareAllWithZero(.eq)) { + if (sent.compareAllWithZero(.eq, mod)) { return Type.initTag(.manyptr_const_u8_sentinel_0); } }, |
