mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Merge pull request #4950 from roc-lang/keep-recptr-index
Initial support for linking recursive pointer layouts back to their source layouts
This commit is contained in:
commit
ad84e02abf
18 changed files with 639 additions and 132 deletions
|
@ -7670,7 +7670,7 @@ fn store_tag_pattern<'a>(
|
|||
for (index, (argument, arg_layout)) in arguments.iter().enumerate().rev() {
|
||||
let mut arg_layout = *arg_layout;
|
||||
|
||||
if let Layout::RecursivePointer = layout_cache.get_in(arg_layout) {
|
||||
if let Layout::RecursivePointer(_) = layout_cache.get_in(arg_layout) {
|
||||
// TODO(recursive-layouts): fix after disjoint rec ptrs
|
||||
arg_layout = layout_cache.put_in(Layout::Union(union_layout));
|
||||
}
|
||||
|
@ -7748,7 +7748,7 @@ fn store_newtype_pattern<'a>(
|
|||
for (index, (argument, arg_layout)) in arguments.iter().enumerate().rev() {
|
||||
let mut arg_layout = *arg_layout;
|
||||
|
||||
if let Layout::RecursivePointer = layout_cache.get_in(arg_layout) {
|
||||
if let Layout::RecursivePointer(_) = layout_cache.get_in(arg_layout) {
|
||||
arg_layout = layout;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue