diff --git a/compiler/parse/tests/test_parse.rs b/compiler/parse/tests/test_parse.rs index 3f07260220..c073d671a3 100644 --- a/compiler/parse/tests/test_parse.rs +++ b/compiler/parse/tests/test_parse.rs @@ -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;