mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Implement better comparisons between alias and body
This commit is contained in:
parent
8b3abafa08
commit
07f7252573
5 changed files with 87 additions and 5 deletions
|
@ -0,0 +1,4 @@
|
|||
B @A : w
|
||||
#
|
||||
@A = e
|
||||
i
|
|
@ -0,0 +1,66 @@
|
|||
@0-14 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-5,
|
||||
@8-12,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 2 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 2, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
type_defs: [
|
||||
Alias {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "B",
|
||||
vars: [
|
||||
@1-3 OpaqueRef(
|
||||
"@A",
|
||||
),
|
||||
],
|
||||
},
|
||||
ann: @4-5 BoundVariable(
|
||||
"w",
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [
|
||||
Body(
|
||||
@8-10 OpaqueRef(
|
||||
"@A",
|
||||
),
|
||||
@11-12 Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@13-14 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "i",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
B@A:w
|
||||
#
|
||||
@A=e
|
||||
i
|
|
@ -528,6 +528,7 @@ mod test_snapshots {
|
|||
pass/opaque_comment_after_head.expr,
|
||||
pass/opaque_destructure_first_item_in_body.expr,
|
||||
pass/opaque_has_abilities.expr,
|
||||
pass/opaque_in_ann_apply_arg.expr,
|
||||
pass/opaque_reference_expr.expr,
|
||||
pass/opaque_reference_expr_with_arguments.expr,
|
||||
pass/opaque_reference_pattern.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue