Fix formatting bug with multline function type alias

This commit is contained in:
Joshua Warner 2024-12-31 19:52:23 -05:00
parent 275b2afb55
commit 835c246c56
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
12 changed files with 129 additions and 40 deletions

View file

@ -0,0 +1,5 @@
e :
J
as H
-> A
r

View file

@ -0,0 +1,63 @@
@0-15 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-13,
],
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: [],
value_defs: [
Annotation(
@0-1 Identifier {
ident: "e",
},
@2-13 Function(
[
@2-0 As(
@2-3 Apply(
"",
"J",
[],
),
[
Newline,
],
TypeHeader {
name: @9-10 "H",
vars: [],
},
),
],
Pure,
@12-13 Apply(
"",
"A",
[],
),
),
),
],
},
@14-15 SpaceBefore(
Var {
module_name: "",
ident: "r",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,3 @@
e:J
as H->A
r

View file

@ -1,6 +1,5 @@
f : a -> b where a implements Hash & Eq, b implements Eq & Hash & Display
f :
a -> b where a implements Hash & Eq, b implements Hash & Display & Eq
f : a -> b where a implements Hash & Eq, b implements Hash & Display & Eq
f

View file

@ -1,4 +1,3 @@
f :
a -> (b -> c) where a implements Hash, b implements Eq, c implements Ord
f : a -> (b -> c) where a implements Hash, b implements Eq, c implements Ord
f

View file

@ -1,4 +1,3 @@
f :
a -> U64 where a implements Hash
f : a -> U64 where a implements Hash
f

View file

@ -330,6 +330,7 @@ mod test_snapshots {
pass/apply_unary_negation.expr,
pass/apply_unary_not.expr,
pass/arg_pattern_as.expr,
pass/as_in_func_type_args.expr,
pass/backpassing_bananza.expr,
pass/backpassing_comment_pattern_fun.expr,
pass/backpassing_in_parens_in_tuple.expr,