mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
variables in pattern matches on single tags
This commit is contained in:
parent
ba69987c1a
commit
b5abed5f54
3 changed files with 100 additions and 39 deletions
|
@ -94,7 +94,7 @@ fn simplify<'a>(pattern: &crate::expr::Pattern<'a>) -> Pattern {
|
|||
..
|
||||
} => {
|
||||
let simplified_args: std::vec::Vec<_> =
|
||||
arguments.iter().map(|v| simplify(&v)).collect();
|
||||
arguments.iter().map(|v| simplify(&v.0)).collect();
|
||||
Ctor(union.clone(), tag_name.clone(), simplified_args)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue