mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
single record update
This commit is contained in:
parent
ee941c9f2e
commit
a94f597e1e
2 changed files with 68 additions and 54 deletions
|
@ -1061,15 +1061,13 @@ fn path_to_expr_help<'a>(
|
|||
(union_layout.layout_at(*tag_id as u8, index as usize), expr)
|
||||
}
|
||||
Layout::Struct(field_layouts) => {
|
||||
let wrapped = Wrapped::opt_from_layout(&layout).unwrap();
|
||||
debug_assert!(field_layouts.len() > 1);
|
||||
debug_assert_eq!(wrapped, Wrapped::RecordOrSingleTagUnion);
|
||||
|
||||
let expr = Expr::AccessAtIndex {
|
||||
index,
|
||||
field_layouts,
|
||||
structure: symbol,
|
||||
wrapped,
|
||||
wrapped: Wrapped::RecordOrSingleTagUnion,
|
||||
};
|
||||
|
||||
let layout = field_layouts[index as usize];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue