Files
zig/test/behavior
Andrew Kelley c764640e92 Sema: fix generics with struct literal coerced to tagged union
The `Value.eql` function has to test for value equality *as-if* the lhs
value parameter is coerced into the type of the rhs. For tagged unions,
there was a problematic case when the lhs was an anonymous struct,
because in such case the value is empty_struct_value and the type
contains all the value information. But the only type available in the
function was the rhs type.

So the fix involved making `Value.eqlAdvanced` also accept the lhs type,
and then enhancing the logic to handle the case of the `.anon_struct` tag.

closes #12418

Tests run locally:
 * test-behavior
 * test-cases
2022-08-17 13:02:57 -07:00
..
2022-02-28 23:20:05 +01:00
2022-07-14 18:11:46 -07:00
2021-10-28 17:33:05 -07:00
2022-03-18 15:02:52 -07:00
2022-08-10 16:13:59 -07:00
2022-02-13 14:42:20 +02:00
2022-06-08 15:51:48 -07:00
2022-08-10 15:18:09 -04:00
2022-07-14 18:11:46 -07:00
2022-01-07 00:06:06 -05:00
2022-02-22 21:57:42 +01:00
2022-03-05 11:31:51 +01:00
2022-08-10 16:43:47 -07:00
2022-03-18 00:12:22 -07:00
2022-03-18 15:02:52 -07:00