fixed another oneString CGenerator bug. Most of these should really be removed, but I wanna commit this one now
This commit is contained in:
14
tests/test_cgen_bug.krak
Normal file
14
tests/test_cgen_bug.krak
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user