mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
fix recursion layout issue
This commit is contained in:
parent
1aa71113ca
commit
06bf614437
4 changed files with 25 additions and 4 deletions
|
@ -140,6 +140,9 @@ fn jit_to_ast_help<'a>(
|
|||
|
||||
single_tag_union_to_ast(env, ptr, field_layouts, tag_name.clone(), payload_vars)
|
||||
}
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_name, _, _)) => {
|
||||
single_tag_union_to_ast(env, ptr, field_layouts, tag_name.clone(), &[])
|
||||
}
|
||||
other => {
|
||||
unreachable!(
|
||||
"Something had a Struct layout, but instead of a Record or TagUnion type, it had: {:?}",
|
||||
|
@ -313,6 +316,9 @@ fn ptr_to_ast<'a>(
|
|||
let (tag_name, payload_vars) = tags.iter().next().unwrap();
|
||||
single_tag_union_to_ast(env, ptr, field_layouts, tag_name.clone(), payload_vars)
|
||||
}
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_name, _, _)) => {
|
||||
single_tag_union_to_ast(env, ptr, field_layouts, tag_name.clone(), &[])
|
||||
}
|
||||
Content::Structure(FlatType::EmptyRecord) => {
|
||||
struct_to_ast(env, ptr, &[], &MutMap::default())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue