From 72497a19162cd8504c0a64c6151bf0734b90f43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besnier?= Date: Sat, 5 Sep 2020 09:17:42 +0200 Subject: [PATCH] add test for tag with no args and boolean --- compiler/reporting/tests/test_reporting.rs | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/compiler/reporting/tests/test_reporting.rs b/compiler/reporting/tests/test_reporting.rs index 48236a33d8..201c911820 100644 --- a/compiler/reporting/tests/test_reporting.rs +++ b/compiler/reporting/tests/test_reporting.rs @@ -969,7 +969,7 @@ mod test_reporting { 4│ f Blue ^^^^ - This `Blue` global tag application has the type: + This `Blue` global tag has the type: [ Blue ]a @@ -2086,6 +2086,35 @@ mod test_reporting { ) } + #[test] + fn boolean_tag() { + report_problem_as( + indoc!( + r#" + 42 + True + "# + ), + indoc!( + r#" + ── TYPE MISMATCH ─────────────────────────────────────────────────────────────── + + The 2nd argument to `add` is not what I expect: + + 1│ 42 + True + ^^^^ + + This `True` boolean has the type: + + [ True ]a + + But `add` needs the 2nd argument to be: + + Num a + "# + ), + ) + } + #[test] fn tag_missing() { report_problem_as(