Template function instantiation type inference work - super simple inference works (i.e. id<T>(i:T) { return i; }), and the framework is good, just have to flesh out unifyType to handle more than the trivial case

This commit is contained in:
Nathan Braswell
2015-05-14 00:25:18 -04:00
parent d70fa4ebbb
commit f5e74ca7ce
5 changed files with 125 additions and 48 deletions

View File

@@ -28,14 +28,14 @@ fun main():int {
var add = 9 + 3
var flt = 9.3
var msg = retMessage()
var fromTemplateFun = id<int>(11);
var fromTemplateFun = id(11);
var vec = new<vector<int>>()->construct()
vec->addEnd(avar)
var src: CustomObj
src.data = 80
var dst = src
var throughTemp = inFun<char*>("complicated");
var throughTemp = inFun("complicated");
println(str)
println(avar)