hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a5e5f910d57663a4d9bd8806b663d2b8e268ff48
parent c067d698ba09f685f0cb5cd66988f25e3157aec2
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun, 10 Dec 2023 15:38:18 +0300

math: Accept types::signed instead of integer in absi

The doc comment even specifies that it accepts a signed value, but it's not
enforced in the type.

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mmath/ints.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/math/ints.ha b/math/ints.ha @@ -40,7 +40,7 @@ export fn absi64(n: i64) u64 = { }; // Returns the absolute value of signed integer n. -export fn absi(n: types::integer) u64 = { +export fn absi(n: types::signed) u64 = { match (n) { case let n: i8 => return absi8(n): u64;