fixed another oneString CGenerator bug. Most of these should really be removed, but I wanna commit this one now

This commit is contained in:
Nathan Braswell
2015-06-12 15:02:22 -04:00
parent cd1b10a633
commit 36833ec263
3 changed files with 17 additions and 1 deletions

14
tests/test_cgen_bug.krak Normal file
View File

@@ -0,0 +1,14 @@
import io:*
import vector:*
fun onlyMatch(vec: vector<int>, matchWith: int): vector<int> {
return vec.filter(fun(it:int, other:int):bool { return it == other; }, matchWith)
}
fun main():int {
var vec = vector(7)
println(onlyMatch(vec,7).size)
println(onlyMatch(vec,9).size)
return 0
}