mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
handle AnnotatedBody everywhere. It compiles now!
This commit is contained in:
parent
d2d3681d7e
commit
014131dabe
6 changed files with 108 additions and 81 deletions
|
@ -509,12 +509,9 @@ fn to_def<'a>(
|
|||
Either::First((body_pattern, body_expr)) => {
|
||||
Def::Body(arena.alloc(body_pattern), arena.alloc(body_expr))
|
||||
}
|
||||
Either::Second(((ann_pattern, ann_type), None)) => annotation_or_alias(
|
||||
arena,
|
||||
&ann_pattern.value,
|
||||
ann_pattern.region,
|
||||
ann_type,
|
||||
),
|
||||
Either::Second(((ann_pattern, ann_type), None)) => {
|
||||
annotation_or_alias(arena, &ann_pattern.value, ann_pattern.region, ann_type)
|
||||
}
|
||||
Either::Second((
|
||||
(ann_pattern, ann_type),
|
||||
Some((opt_comment, (body_pattern, body_expr))),
|
||||
|
@ -522,8 +519,8 @@ fn to_def<'a>(
|
|||
ann_pattern: ann_pattern,
|
||||
ann_type: ann_type,
|
||||
comment: opt_comment,
|
||||
body_pattern: body_pattern,
|
||||
body_expr: body_expr,
|
||||
body_pattern: arena.alloc(body_pattern),
|
||||
body_expr: arena.alloc(body_expr),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue