mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
add tests
This commit is contained in:
parent
006b1f8696
commit
9745d86efb
2 changed files with 42 additions and 21 deletions
|
@ -156,7 +156,7 @@ fn flatten<'a>(path_pattern: (Path, Pattern<'a>), path_patterns: &mut Vec<(Path,
|
|||
// dearg (Can.PatternCtorArg _ _ pattern) =
|
||||
// pattern
|
||||
|
||||
todo!()
|
||||
todo!("alternatives: {:?}", union.alternatives)
|
||||
} else {
|
||||
path_patterns.push(path_pattern);
|
||||
}
|
||||
|
@ -911,7 +911,8 @@ fn decide_to_branching<'a>(
|
|||
Test::IsFloat(v) => v as u64,
|
||||
Test::IsBit(v) => v as u64,
|
||||
Test::IsByte { tag_id, .. } => tag_id as u64,
|
||||
_ => todo!(),
|
||||
Test::IsCtor { tag_id, .. } => tag_id as u64,
|
||||
other => todo!("other {:?}", other),
|
||||
};
|
||||
|
||||
branches.push((tag, branch));
|
||||
|
@ -921,9 +922,7 @@ fn decide_to_branching<'a>(
|
|||
Expr::Switch {
|
||||
cond,
|
||||
cond_layout,
|
||||
// branches: &'a [(u64, Expr<'a>)],
|
||||
branches: branches.into_bump_slice(),
|
||||
// default_branch: &'a Expr<'a>,
|
||||
default_branch,
|
||||
ret_layout,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue