correctly parse trailing commas in record

This commit is contained in:
Sébastien Besnier 2020-11-13 18:43:32 +01:00
parent 7ec161c415
commit 58acc59b01
8 changed files with 135 additions and 57 deletions

View file

@ -208,7 +208,7 @@ pub fn canonicalize_expr<'a>(
ast::Expr::Record {
fields,
update: Some(loc_update),
trailing_comma: _,
final_comments: _,
} => {
let (can_update, update_out) =
canonicalize_expr(env, var_store, scope, loc_update.region, &loc_update.value);
@ -256,7 +256,7 @@ pub fn canonicalize_expr<'a>(
ast::Expr::Record {
fields,
update: None,
trailing_comma: _,
final_comments: _,
} => {
if fields.is_empty() {
(EmptyRecord, Output::default())