mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
simplify Bool layout
This commit is contained in:
parent
f906c9b4b4
commit
c11f374eb0
8 changed files with 103 additions and 105 deletions
|
@ -632,9 +632,7 @@ fn build_switch<'a, 'ctx, 'env>(
|
|||
// they either need to all be i8, or i64
|
||||
let int_val = match cond_layout {
|
||||
Layout::Builtin(Builtin::Int64) => context.i64_type().const_int(*int as u64, false),
|
||||
Layout::Builtin(Builtin::Bool(_, _)) => {
|
||||
context.bool_type().const_int(*int as u64, false)
|
||||
}
|
||||
Layout::Builtin(Builtin::Bool) => context.bool_type().const_int(*int as u64, false),
|
||||
Layout::Builtin(Builtin::Byte(_)) => context.i8_type().const_int(*int as u64, false),
|
||||
_ => panic!("Can't cast to cond_layout = {:?}", cond_layout),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue