Merge branch 'trunk' of https://github.com/rtfeldman/roc into add-dec-types

This commit is contained in:
Jared Ramirez 2021-07-08 16:47:42 -07:00
commit 67eef2c97f
82 changed files with 3791 additions and 2228 deletions

View file

@ -861,11 +861,12 @@ fn expr_spec(
union_layout,
} => match union_layout {
UnionLayout::NonRecursive(_) => {
let index = (*index) as u32;
let tag_value_id = env.symbols[structure];
let tuple_value_id =
builder.add_unwrap_union(block, tag_value_id, *tag_id as u32)?;
builder.add_get_tuple_field(block, tuple_value_id, *index as u32)
builder.add_get_tuple_field(block, tuple_value_id, index)
}
_ => {
// for the moment recursive tag unions don't quite work