Fix chained indirect templates: template<T> |T| fun(|vector<T>| a) { return a.at(0); }, etc
This commit is contained in:
15
tests/test_chainedIndirectTemplates.krak
Normal file
15
tests/test_chainedIndirectTemplates.krak
Normal file
@@ -0,0 +1,15 @@
|
||||
import vector:*;
|
||||
import io:*;
|
||||
|
||||
template <T> |T| test(|vector<T>| a) {
|
||||
return a.at(0);
|
||||
}
|
||||
|
||||
|int| main() {
|
||||
|vector<int>| a.construct();
|
||||
a.addEnd(2);
|
||||
println(test<int>(a));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user