strange-like behavior in openArray in multiple types

2021-10-19 Thread ElegantBeef
I'd argue it's a bug, but I think it's designed this way intentionally. It really kills composabillity and sadly the new `iterable` falls into the same design flaw.

strange-like behavior in openArray in multiple types

2021-10-19 Thread puruneko
to @demotomohiro I see already there is the same issue. Is it correct to consider that this problem is a bug? to @ynfle great! This is what I needed. thank you.

strange-like behavior in openArray in multiple types

2021-10-19 Thread ynfle
Try `varargs[bool]` and then you won't need `or`

strange-like behavior in openArray in multiple types

2021-10-19 Thread demotomohiro
Related issue:

strange-like behavior in openArray in multiple types

2021-10-19 Thread puruneko
when `openArray` in multiple types is set in function's argument, compile error is occurred. proc f1(b: openArray[bool]) = echo b f1(@[true]) #fine f1([true]) #fine proc f2(b: bool or openArray[bool]) = echo b f2(true) #fine f2(@[tru