mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Use runtime representation of values when building structural eq
Closes #4348
This commit is contained in:
parent
99ad019d75
commit
7986514d20
2 changed files with 20 additions and 0 deletions
|
@ -147,6 +147,8 @@ fn build_eq<'a, 'ctx, 'env>(
|
|||
rhs_layout: &Layout<'a>,
|
||||
when_recursive: WhenRecursive<'a>,
|
||||
) -> BasicValueEnum<'ctx> {
|
||||
let lhs_layout = &lhs_layout.runtime_representation(env.layout_interner);
|
||||
let rhs_layout = &rhs_layout.runtime_representation(env.layout_interner);
|
||||
if lhs_layout != rhs_layout {
|
||||
panic!(
|
||||
"Equality of different layouts; did you have a type mismatch?\n{:?} == {:?}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue