mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Fix handling of spaces after for as
This commit is contained in:
parent
3abc276937
commit
25084b18ec
3 changed files with 35 additions and 8 deletions
|
@ -7,11 +7,8 @@ When(
|
|||
patterns: [
|
||||
@14-20 SpaceBefore(
|
||||
As(
|
||||
@14-15 SpaceAfter(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[],
|
||||
@14-15 Underscore(
|
||||
"",
|
||||
),
|
||||
PatternAs {
|
||||
spaces_before: [],
|
||||
|
|
|
@ -6113,6 +6113,31 @@ mod test_fmt {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_6215() {
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
when list is
|
||||
[first as last]
|
||||
| [first, last] ->
|
||||
first
|
||||
_->Not
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
when list is
|
||||
[first as last]
|
||||
| [first, last] ->
|
||||
first
|
||||
|
||||
_ -> Not
|
||||
"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// this is a parse error atm
|
||||
// #[test]
|
||||
// fn multiline_apply() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue