Files
corelang/examples/function_overloading.kl
Krzosa Karol 7cc01be358 Restructuring
2022-09-29 13:02:40 +02:00

24 lines
607 B
Plaintext

/*
@todo: Add function overloading
Current plan:
* allow insert_into_scope to insert multiple lambdas
* change resolve_name and search_for_decl to something
that can seek multiple lambda declarations
resolve them and return a match to hash or type
* change the order of lambda call resolution, probably would have to
hash the arguments first to match the lambda call
*/
// Add :: (a: int, b: int): int ;; return a + b
// Add :: (a: F32, b: F32): F32 ;; return a + b
main :: (): int
a: F32 = 3
b: F32 = 2
c: int = 4
d: int = 10
// e := Add(a, b)
// f := Add(c, d)
return 0