New test that tests template inference through instantiated templates, implemented it in kalypso, 51 tests passing

This commit is contained in:
Nathan Braswell
2016-03-08 12:09:27 -05:00
parent 9eb5db84ab
commit 5b3af2fa25
3 changed files with 42 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
true
true

View File

@@ -0,0 +1,19 @@
import simple_print:*
obj Object<T> {
var data: T
}
fun get<T>(a: Object<T>): T {
var temp = a.data;
println(temp)
return temp
}
fun main(): int {
var b: Object<bool>
b.data = true
println(get(b))
return 0
}