From d87b5bfd9f3ed350df98e31584d4c8249e70d1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besnier?= Date: Sat, 21 Nov 2020 14:59:10 +0100 Subject: [PATCH] add failing tests --- compiler/can/src/annotation.rs | 4 ++-- compiler/fmt/tests/test_fmt.rs | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/compiler/can/src/annotation.rs b/compiler/can/src/annotation.rs index 0896942814..f9db76ab05 100644 --- a/compiler/can/src/annotation.rs +++ b/compiler/can/src/annotation.rs @@ -380,7 +380,7 @@ fn can_annotation_help( } }, - Record { fields, ext } => { + Record { fields, ext, .. } => { let field_types = can_assigned_fields( env, fields, @@ -408,7 +408,7 @@ fn can_annotation_help( Type::Record(field_types, Box::new(ext_type)) } - TagUnion { tags, ext } => { + TagUnion { tags, ext, .. } => { let tag_types = can_tags( env, tags, diff --git a/compiler/fmt/tests/test_fmt.rs b/compiler/fmt/tests/test_fmt.rs index cf9e33a53b..f4b74d39d2 100644 --- a/compiler/fmt/tests/test_fmt.rs +++ b/compiler/fmt/tests/test_fmt.rs @@ -781,6 +781,26 @@ mod test_fmt { ); } + // // TODO This raises a parse error: + // // NotYetImplemented("TODO the : in this declaration seems outdented") + // #[test] + // fn comments_in_record_annotation() { + // expr_formats_to( + // indoc!( + // r#" + // f : + // {} + + // f"# + // ), + // indoc!( + // r#" + // f : b {} + // f"# + // ), + // ); + // } + #[test] fn def_closure() { expr_formats_same(indoc!( @@ -2287,7 +2307,7 @@ mod test_fmt { )); } - // This raises a parse error: + // TODO This raises a parse error: // NotYetImplemented("TODO the : in this declaration seems outdented") // #[test] // fn multiline_tag_union_annotation() {