mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Admit tag destructuring in definitions
This commit is contained in:
parent
6a38a2948f
commit
0c81302d29
5 changed files with 46 additions and 1 deletions
|
@ -410,7 +410,7 @@ impl<'a> ExprState<'a> {
|
|||
let fail = EExpr::BadOperator(opchar, loc_op.region.start());
|
||||
|
||||
Err(fail)
|
||||
} else if !self.arguments.is_empty() {
|
||||
} else if !self.expr.value.is_tag() && !self.arguments.is_empty() {
|
||||
let region = Region::across_all(self.arguments.iter().map(|v| &v.region));
|
||||
|
||||
Err(argument_error(region, loc_op.region.start()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue