mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Fix formatting of newlines in parens in a function type
This commit is contained in:
parent
cae47cf2a6
commit
2163b28390
5 changed files with 77 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
C : h -> a
|
||||
C
|
|
@ -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,
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
C:(
|
||||
h)->a
|
||||
C
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue