mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix parens around as in tag union
This commit is contained in:
parent
7ba5135602
commit
512be85f9a
5 changed files with 75 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
1 : [N (* as S)]
|
||||
_
|
|
@ -0,0 +1,56 @@
|
|||
@0-15 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-13,
|
||||
],
|
||||
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 NumLiteral(
|
||||
"1",
|
||||
),
|
||||
@2-13 TagUnion {
|
||||
ext: None,
|
||||
tags: [
|
||||
@3-12 Apply {
|
||||
name: @3-4 "N",
|
||||
args: [
|
||||
@5-0 As(
|
||||
@5-6 Wildcard,
|
||||
[],
|
||||
TypeHeader {
|
||||
name: @9-10 "S",
|
||||
vars: [],
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@14-15 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
1:[N(*as(S))]
|
||||
_
|
|
@ -684,6 +684,7 @@ mod test_snapshots {
|
|||
pass/tag_destructure_bang.expr,
|
||||
pass/tag_destructure_bang_no_space.expr,
|
||||
pass/tag_pattern.expr,
|
||||
pass/tag_union_ann_with_as.expr,
|
||||
pass/ten_times_eleven.expr,
|
||||
pass/three_arg_closure.expr,
|
||||
pass/triple_paren_pat_ann.expr,
|
||||
|
@ -773,7 +774,7 @@ mod test_snapshots {
|
|||
true
|
||||
}
|
||||
|
||||
"parens_newlines_before_as" => {
|
||||
"parens_newlines_before_as" | "tag_union_ann_with_as" => {
|
||||
// Found unbound type variables {66}
|
||||
// in type alias `Test.IdentId(0)` [] [] : <66>
|
||||
// Location: crates/compiler/can/src/scope.rs:541:13
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue