mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
add failing test
This commit is contained in:
parent
06cb1d1e30
commit
d632e588ef
1 changed files with 39 additions and 0 deletions
|
@ -1733,6 +1733,45 @@ mod test_parse {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiline_type_signature() {
|
||||
assert_parses_to(
|
||||
"f :\n {}\n\n42",
|
||||
Defs(
|
||||
&[&Located::new(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
6,
|
||||
Def::Annotation(
|
||||
Located::new(0, 0, 0, 1, Pattern::Identifier("f")),
|
||||
Located::new(
|
||||
1,
|
||||
1,
|
||||
4,
|
||||
6,
|
||||
TypeAnnotation::SpaceBefore(
|
||||
&TypeAnnotation::Record {
|
||||
fields: &[],
|
||||
ext: None,
|
||||
final_comments: &[],
|
||||
},
|
||||
&[Newline],
|
||||
),
|
||||
),
|
||||
),
|
||||
)],
|
||||
&Located::new(
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
2,
|
||||
Expr::SpaceBefore(&Expr::Num("42"), &[Newline, Newline]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// #[test]
|
||||
// fn type_signature_function_def() {
|
||||
// use TypeAnnotation;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue