Make sure ext's can't slurp surrounding apply args

This commit is contained in:
Joshua Warner 2024-12-02 19:42:17 -08:00
parent fc74b67d86
commit 1be2075e7f
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 101 additions and 8 deletions

View file

@ -0,0 +1,58 @@
SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-10,
],
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: "i",
},
@2-10 Apply(
"",
"M",
[
@3-8 Tuple {
elems: [],
ext: Some(
@6-7 Apply(
"",
"Y",
[],
),
),
},
@9-10 BoundVariable(
"c",
),
],
),
),
],
},
@11-12 SpaceBefore(
Var {
module_name: "",
ident: "t",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -306,6 +306,7 @@ mod test_snapshots {
pass/apply_record_ann.expr,
pass/apply_tag.expr,
pass/apply_three_args.expr,
pass/apply_tuple_ext_parens_ty.expr,
pass/apply_two_args.expr,
pass/apply_unary_negation.expr,
pass/apply_unary_not.expr,