mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-15 00:05:02 +00:00
Merge pull request #3615 from rtfeldman/3198
Support parsing opaque destructures as first item in nested body
This commit is contained in:
commit
50021a65cf
5 changed files with 82 additions and 1 deletions
|
@ -444,7 +444,10 @@ 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