This commit is contained in:
Folkert 2021-06-27 13:49:49 +02:00
parent 8add147dcf
commit 99d0d9c732
8 changed files with 40 additions and 83 deletions

View file

@ -861,8 +861,7 @@ fn expr_spec(
union_layout,
} => match union_layout {
UnionLayout::NonRecursive(_) => {
// let index = (*index - 1) as u32;
let index = (*index - 1) as u32;
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)?;