Fix 'implements' variable in types

This commit is contained in:
Joshua Warner 2024-12-15 16:32:03 -08:00
parent cc611533e0
commit d6d396b887
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 61 additions and 1 deletions

View file

@ -0,0 +1,51 @@
@0-20 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(0),
],
regions: [
@0-18,
],
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: [
Opaque {
header: TypeHeader {
name: @0-1 "N",
vars: [],
},
typ: @3-17 Function(
[
@3-4 BoundVariable(
"e",
),
],
Pure,
@7-17 BoundVariable(
"implements",
),
),
derived: None,
},
],
value_defs: [],
},
@19-20 SpaceBefore(
Tag(
"I",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
N:=e->(implements)
I

View file

@ -655,6 +655,7 @@ mod test_snapshots {
pass/single_arg_closure.expr,
pass/single_arg_with_underscore_closure.expr,
pass/single_underscore_closure.expr,
pass/sneaky_implements_in_opaque_fn_type.expr,
pass/space_before_colon.full,
pass/space_before_parens_space_after.expr,
pass/space_only_after_minus.expr,