mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Have FunctionOrTagUnion include multiple possible tags
This commit is contained in:
parent
797763b5fa
commit
61cf8e53e6
9 changed files with 155 additions and 85 deletions
|
@ -450,8 +450,8 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>(
|
|||
payload_vars,
|
||||
))
|
||||
}
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_name, _, _)) => {
|
||||
let tag_name = &env.subs[*tag_name];
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_names, _, _)) => {
|
||||
let tag_name = &env.subs.get_subs_slice(*tag_names)[0];
|
||||
|
||||
Ok(single_tag_union_to_ast(
|
||||
env,
|
||||
|
@ -631,8 +631,8 @@ fn addr_to_ast<'a, M: ReplAppMemory>(
|
|||
let (tag_name, payload_vars) = unpack_single_element_tag_union(env.subs, *tags);
|
||||
single_tag_union_to_ast(env, mem, addr, field_layouts, tag_name, payload_vars)
|
||||
}
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_name, _, _)) => {
|
||||
let tag_name = &env.subs[*tag_name];
|
||||
Content::Structure(FlatType::FunctionOrTagUnion(tag_names, _, _)) => {
|
||||
let tag_name = &env.subs.get_subs_slice(*tag_names)[0];
|
||||
single_tag_union_to_ast(env, mem, addr, field_layouts, tag_name, &[])
|
||||
}
|
||||
Content::Structure(FlatType::EmptyRecord) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue