mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-16 00:35:01 +00:00
Support parsing opaque destructures as first item in nested body
Closes #3198
This commit is contained in:
parent
53e7a41f27
commit
b04764bdd6
5 changed files with 81 additions and 1 deletions
|
@ -413,7 +413,9 @@ impl<'a> ExprState<'a> {
|
|||
let fail = EExpr::BadOperator(opchar, loc_op.region.start());
|
||||
|
||||
Err(fail)
|
||||
} else if !self.expr.value.is_tag() && !self.arguments.is_empty() {
|
||||
} else if !(self.expr.value.is_tag() || self.expr.value.is_opaque())
|
||||
&& !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