From 8fdc77167a0bf858c94b72b37e2c5e92a9924748 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 19 Feb 2020 21:32:50 -0800 Subject: [PATCH] Add test for unit alias working in defs --- tests/test_infer.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_infer.rs b/tests/test_infer.rs index 0a0fb2a6de..b37681ffec 100644 --- a/tests/test_infer.rs +++ b/tests/test_infer.rs @@ -1940,6 +1940,23 @@ mod test_infer { ); } + #[test] + fn unit_alias() { + infer_eq( + indoc!( + r#" + Unit : [ Unit ] + + unit : Unit + unit = Unit + + unit + "# + ), + "Unit", + ); + } + #[test] fn rigid_in_letnonrec() { infer_eq_without_problem(