OK, I had to clean it up a little to make it work, but here is the code that gets it to compile. var cnt: array[rescnt, uint] parallel: for i in 0..rescnt-1: cnt[i] = spawn segcount(i*KB, Kn) sync() for i in 0..rescnt-1: primecnt += cnt[i].uint
So was the issue that the single value of `cnt` was getting clobbered by each thread's return value, causing the type mismatch? Thanks for getting it to compile, but if you can explain why this works I'd appreciate it even more.