From 30210fac06a6719a1f547a8cd1e24c159d7e7ee7 Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 21 Feb 2025 23:53:32 +0330 Subject: add a lot of goodies in types --- test/main.felan | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/main.felan b/test/main.felan index 387bd90..b14a3ee 100644 --- a/test/main.felan +++ b/test/main.felan @@ -1,9 +1,17 @@ -test :: ()->void; - -main : test : () -> void { - a := 10; +main :: () -> void { + a :theType= 10; while a > 0 { print_u64 1; a = a -1; } }; + +theType :: getType(u64,i64); +signed :: true; + +getType :: (a:type,b:type)->type { + if signed + return a; + else + return b; +}; -- cgit v1.2.3