Fix formatting of newlines in parens in a function type

This commit is contained in:
Joshua Warner 2024-12-02 18:09:23 -08:00
parent cae47cf2a6
commit 2163b28390
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,50 @@
Defs(
Defs {
tags: [
EitherIndex(0),
],
regions: [
@0-9,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [
Alias {
header: TypeHeader {
name: @0-1 "C",
vars: [],
},
ann: @4-9 Function(
[
@4-5 SpaceBefore(
BoundVariable(
"h",
),
[
Newline,
],
),
],
Pure,
@8-9 BoundVariable(
"a",
),
),
},
],
value_defs: [],
},
@10-11 SpaceBefore(
Tag(
"C",
),
[
Newline,
],
),
)

View file

@ -543,6 +543,7 @@ mod test_snapshots {
pass/parens_empty_record_apply.expr,
pass/parens_func_apply_type.expr,
pass/parens_in_type_def_apply.expr,
pass/parens_newline_in_func_type.expr,
pass/parens_record_updater.expr,
pass/parenthesized_type_def.expr,
pass/parenthesized_type_def_space_before.expr,