Template replacements acutally propegate through the function now - but it doesn't decorate names so that same named functions with same parameters but instantiated by different types but with the resulting same prototype, so they end up having the same name in C, which needs to be addressed.

This commit is contained in:
Nathan Braswell
2016-02-04 23:32:47 -05:00
parent de3ead0573
commit 5dd8046d2f
3 changed files with 73 additions and 63 deletions

View File

@@ -39,6 +39,12 @@ fun return_something_p_1(it: Something): Something {
*/
fun id<T>(in: *T): *T return in;
fun id<T>(in: T): T return in;
fun other_id<T>(in: T): T {
var a: T
a = in
simple_println(id<T>(in))
return in;
}
/*
fun some_function(): int return 0;
fun some_other_function(in: bool): float {
@@ -52,6 +58,7 @@ fun main(): int {
/*var b = id<*char>("Double down time")*/
/*simple_println(b)*/
simple_println(id<char>("Double down time"))
simple_println(other_id<*char>("Triple down time"))