Fix double-as formatting

This commit is contained in:
Joshua Warner 2024-12-14 20:25:42 -08:00
parent 307b0d9ea9
commit 54a0456c30
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 72 additions and 1 deletions

View file

@ -0,0 +1,2 @@
s : (e as A) as A
s

View file

@ -0,0 +1,56 @@
@0-16 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-14,
],
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: "s",
},
@3-0 As(
@3-0 As(
@3-4 BoundVariable(
"e",
),
[],
TypeHeader {
name: @8-9 "A",
vars: [],
},
),
[],
TypeHeader {
name: @13-14 "A",
vars: [],
},
),
),
],
},
@15-16 SpaceBefore(
Var {
module_name: "",
ident: "s",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
s:(e as A)as A
s

View file

@ -299,6 +299,7 @@ mod test_snapshots {
pass/annotated_tuple_destructure.expr,
pass/annotation_apply_newlines.expr,
pass/annotation_comment_before_colon.expr,
pass/annotation_double_as.expr,
pass/annotation_tag_parens_comment.expr,
pass/annotation_tuple_comment.expr,
pass/annotation_tuple_newline.expr,