sequtils insert sink problem

2021-06-05 Thread shirleyquirk
`insert` is defined for seq in `system`, that's the signature you saw with `sink T`, inserting an element into a seq. the one in `sequtils` you wanted was for inserting another seq into a seq.

sequtils insert sink problem

2021-06-05 Thread Sixte
> please post complete, minimized examples otherwise it's impossible to tell if > there's an actual bug or not I didn't claim a bug. The `sequtils` was hidden behind another import layer, so it's okay that the compiler didn't know about it. However, the compiler knew about it, because it report

sequtils insert sink problem

2021-06-04 Thread xigoi
Did you actually `include` that file? Or `import` it?

sequtils insert sink problem

2021-06-04 Thread timothee
> I included another file that imported sequtils please post complete, minimized examples otherwise it's impossible to tell if there's an actual bug or not

sequtils insert sink problem

2021-06-04 Thread Sixte
> You have to import a module to use it. Interesting. I included another file that imported sequtils. So I thought that it already was available. Your are right, if I import sequtils (again), it works. Thank you.

sequtils insert sink problem

2021-06-04 Thread doofenstein
it works fine for me if I add `import sequtils` as the first line.

sequtils insert sink problem

2021-06-04 Thread juancarlospaco
You have to import a module to use it.

sequtils insert sink problem

2021-06-04 Thread Sixte
I tried to compile: (example drawn from the sequtils documentation) proc run() = var dest = @[1, 1, 1, 1, 1, 1, 1, 1] let src = @[2, 2, 2, 2, 2, 2] let outcome = @[1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1] dest.insert(src, 3) assert dest == outcome