mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Multiple record builder error
This commit is contained in:
parent
20f8133b6c
commit
6670fbb1ab
11 changed files with 115 additions and 4 deletions
|
@ -327,6 +327,7 @@ pub enum Expr<'a> {
|
|||
// Both operators were non-associative, e.g. (True == False == False).
|
||||
// We should tell the author to disambiguate by grouping them with parens.
|
||||
PrecedenceConflict(&'a PrecedenceConflict<'a>),
|
||||
MultipleRecordBuilders(&'a Loc<Expr<'a>>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
@ -1533,7 +1534,8 @@ impl<'a> Malformed for Expr<'a> {
|
|||
|
||||
MalformedIdent(_, _) |
|
||||
MalformedClosure |
|
||||
PrecedenceConflict(_) => true,
|
||||
PrecedenceConflict(_) |
|
||||
MultipleRecordBuilders(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1928,6 +1928,7 @@ fn expr_to_pattern_help<'a>(arena: &'a Bump, expr: &Expr<'a>) -> Result<Pattern<
|
|||
| Expr::Dbg(_, _)
|
||||
| Expr::MalformedClosure
|
||||
| Expr::PrecedenceConflict { .. }
|
||||
| Expr::MultipleRecordBuilders { .. }
|
||||
| Expr::RecordUpdate { .. }
|
||||
| Expr::UnaryOp(_, _)
|
||||
| Expr::Crash => return Err(()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue