mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 13:34:15 +00:00
Force initial newline in multiline ability def (fixes #7365)
This commit is contained in:
parent
abde9e86b1
commit
f86f440f2f
6 changed files with 96 additions and 8 deletions
|
|
@ -0,0 +1,5 @@
|
|||
A implements
|
||||
q : U
|
||||
e
|
||||
-> p
|
||||
d
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
@0-24 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-22,
|
||||
],
|
||||
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: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "A",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @2-12 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @13-14 "q",
|
||||
typ: @15-22 Function(
|
||||
[
|
||||
@15-19 Apply(
|
||||
"",
|
||||
"U",
|
||||
[
|
||||
@18-19 SpaceBefore(
|
||||
BoundVariable(
|
||||
"e",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
Pure,
|
||||
@21-22 BoundVariable(
|
||||
"p",
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@23-24 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "d",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
A implements q:U
|
||||
e->p
|
||||
d
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
S implements d : J
|
||||
m #
|
||||
S implements
|
||||
d : J
|
||||
m #
|
||||
D
|
||||
|
|
@ -424,6 +424,7 @@ mod test_snapshots {
|
|||
pass/i_over_not_g.expr,
|
||||
pass/if_def.expr,
|
||||
pass/if_newline_then_negate_else_recordupdater.expr,
|
||||
pass/implements_newline_in_fn_ty.expr,
|
||||
pass/implements_newlines_comments.expr,
|
||||
pass/import.moduledefs,
|
||||
pass/import_from_package.moduledefs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue