harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 40159a9a72927713aa6e16fd0f48b2b1c110414a
parent 5f52622a1a740a98de74cb540503a5171ae1fd03
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 10 Feb 2021 12:39:29 -0500

tests/21-tuples: add testing return type

Diffstat:
Mtests/21-tuples.ha | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/tests/21-tuples.ha b/tests/21-tuples.ha @@ -10,7 +10,15 @@ fn indexing() void = { assert(x.0 == 42 && x.1 == 1337z); }; +fn func(in: (int, size)) (int, size) = (in.0 + 1, in.1 + 1z); + +fn funcs() void = { + let x = func((41, 1336z)); + assert(x.0 == 42 && x.1 == 1337z); +}; + export fn main() void = { storage(); indexing(); + funcs(); };