mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Fix where precedence vs apply
This commit is contained in:
parent
ea7d856e16
commit
6fcc367af4
5 changed files with 67 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
1 : A (* where e implements J) *
|
||||
l
|
|
@ -0,0 +1,61 @@
|
|||
@0-30 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-28,
|
||||
],
|
||||
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 NumLiteral(
|
||||
"1",
|
||||
),
|
||||
@2-28 Apply(
|
||||
"",
|
||||
"A",
|
||||
[
|
||||
@4-25 Where(
|
||||
@4-5 Wildcard,
|
||||
[
|
||||
@11-25 ImplementsClause {
|
||||
var: @11-12 "e",
|
||||
abilities: [
|
||||
@24-25 Apply(
|
||||
"",
|
||||
"J",
|
||||
[],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
),
|
||||
@27-28 Wildcard,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@29-30 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "l",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
1:A(*where e implements J) *
|
||||
l
|
|
@ -783,6 +783,7 @@ mod test_snapshots {
|
|||
pass/where_clause_on_newline.expr,
|
||||
pass/where_ident.expr,
|
||||
pass/where_in_tuple_after_comment.expr,
|
||||
pass/where_in_tuple_plain.expr,
|
||||
pass/zero_float.expr,
|
||||
pass/zero_int.expr,
|
||||
// END SNAPSHOTS (for automatic test detection via `env ROC_SNAPSHOT_TEST_OVERWRITE=1 cargo test`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue