From cd4c665d50391d7c3afa68fc37db4ac6490eb23a Mon Sep 17 00:00:00 2001 From: Li Junchen Date: Thu, 29 Feb 2024 15:59:51 +0800 Subject: [PATCH] fix warnings --- list/list.mbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/list/list.mbt b/list/list.mbt index 2a3c21e36..92d26daf0 100644 --- a/list/list.mbt +++ b/list/list.mbt @@ -195,7 +195,7 @@ pub fn head_option[T](self : List[T]) -> Option[T] { test "head option" { let ls = of_array([1, 2, 3, 4, 5]) @assertion.assert_eq(ls.head_option(), Some(1)) - let ls2 = of_array([]) + let ls2 : List[Unit] = of_array([]) @assertion.assert_eq(ls2, Nil) } @@ -419,7 +419,7 @@ pub fn is_empty[T](self : List[T]) -> Bool { test "is_empty" { let ls = of_array([1, 2, 3, 4, 5]) @assertion.assert_false(ls.is_empty()) - @assertion.assert_true(List::Nil.is_empty()) + @assertion.assert_true((List::Nil : List[Unit]).is_empty()) } /// Unzip two lists.