Fix where precedence vs funcs

This commit is contained in:
Joshua Warner 2025-01-03 17:33:23 -08:00
parent b7ab25ee2e
commit 35ffbcd16b
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 93 additions and 1 deletions

View file

@ -0,0 +1,5 @@
x :
(a where e
implements K)
-> Z
s

View file

@ -0,0 +1,81 @@
@0-31 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-29,
],
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: "x",
},
@3-28 Function(
[
@3-25 Where(
@3-4 SpaceAfter(
BoundVariable(
"a",
),
[
Newline,
],
),
[
@11-25 ImplementsClause {
var: @11-12 SpaceBefore(
SpaceAfter(
"e",
[
Newline,
],
),
[
Newline,
],
),
abilities: [
@24-25 Apply(
"",
"K",
[],
),
],
},
],
),
],
Pure,
@27-28 Apply(
"",
"Z",
[],
),
),
),
],
},
@30-31 SpaceBefore(
Var {
module_name: "",
ident: "s",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,5 @@
x:(a
where
e
implements K->Z)
s

View file

@ -301,6 +301,7 @@ mod test_snapshots {
pass/ann_effectful_fn.expr,
pass/ann_open_union.expr,
pass/ann_parens_comments.expr,
pass/ann_parens_where_implements_func.expr,
pass/ann_pattern_comment_before_body.expr,
pass/ann_record_pat_with_comment.expr,
pass/ann_tag_union_newline_comment.expr,