diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-17 12:55:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-17 13:02:57 -0700 |
| commit | c764640e92c9e4d32b89650ac774bebf1498be92 (patch) | |
| tree | 5b17ee88da0d6499007a36a3a4b701c5d8f44a81 /src/codegen/spirv/Module.zig | |
| parent | a12abc6d6c8b89a09befdcbd9019247ccc3bd641 (diff) | |
| download | zig-c764640e92c9e4d32b89650ac774bebf1498be92.tar.gz zig-c764640e92c9e4d32b89650ac774bebf1498be92.zip | |
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
Diffstat (limited to 'src/codegen/spirv/Module.zig')
0 files changed, 0 insertions, 0 deletions
