add failing test

This commit is contained in:
Sébastien Besnier 2020-11-23 14:24:10 +01:00
parent 06cb1d1e30
commit d632e588ef

View file

@ -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;