| author | |
| committer | |
| log | 7e47f106ccf73af4c890ecbb4d48e9e92d38d3c4 |
| tree | ccd3bffee8bb0d866715216da196e1b69b676fb1 |
| parent | c38b4bcee7c9e6913fdf95c1572a7d8125eab1a4 |
Although lazy_align is a different tag than integer values, it needs to
be hashed and equality-tested as if it were a simple integer. Otherwise
our basic data structure guarantees fall apart.1 files changed, 1 insertions(+), 7 deletions(-)
src/value.zig+1-7| ... | ... | @@ -2476,15 +2476,9 @@ pub const Value = extern union { |
| 2476 | 2476 | .bool_false, |
| 2477 | 2477 | .bool_true, |
| 2478 | 2478 | .the_only_possible_value, |
| 2479 | .lazy_align, | |
| 2479 | 2480 | => return hashInt(ptr_val, hasher, target), |
| 2480 | 2481 | |
| 2481 | .lazy_align => { | |
| 2482 | // Bit weird to have this here but this function is also called | |
| 2483 | // on integers. | |
| 2484 | const ty = ptr_val.castTag(.lazy_align).?.data; | |
| 2485 | ty.hashWithHasher(hasher, target); | |
| 2486 | }, | |
| 2487 | ||
| 2488 | 2482 | else => unreachable, |
| 2489 | 2483 | } |
| 2490 | 2484 | } |