mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
added branch info and uniqueness check
This commit is contained in:
parent
d10d71cdec
commit
fdfa978ca8
3 changed files with 45 additions and 14 deletions
|
@ -1355,8 +1355,21 @@ where
|
|||
arena.alloc(Stmt::Switch {
|
||||
cond_symbol: unique_symbol,
|
||||
cond_layout: Layout::BOOL,
|
||||
branches: &*arena.alloc([(1, BranchInfo::None, u.clone())]),
|
||||
default_branch: (BranchInfo::None, n),
|
||||
branches: &*arena.alloc([(
|
||||
1,
|
||||
BranchInfo::Unique {
|
||||
scrutinee: unique_symbol,
|
||||
unique: true,
|
||||
},
|
||||
u.clone(),
|
||||
)]),
|
||||
default_branch: (
|
||||
BranchInfo::Unique {
|
||||
scrutinee: unique_symbol,
|
||||
unique: false,
|
||||
},
|
||||
n,
|
||||
),
|
||||
ret_layout: environment.layout,
|
||||
})
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue