From 4c2a90e772e83275157e51087ef11075d29f28b2 Mon Sep 17 00:00:00 2001 From: Ryan Vandersmith Date: Wed, 21 Feb 2024 10:35:01 -0700 Subject: [PATCH] Fix compiler warning in `Array.take()` method (#611) Fixes one of the compiler warnings mentioned in #610. --- src/Array.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Array.mo b/src/Array.mo index 1f207ba3..8d262b41 100644 --- a/src/Array.mo +++ b/src/Array.mo @@ -859,7 +859,7 @@ module { let len = Prim.abs(length); let size = array.size(); let resSize = if (len < size) { len } else { size }; - let start = if (length > 0) 0 else size - resSize; + let start : Nat = if (length > 0) 0 else size - resSize; subArray(array, start, resSize) } }