fixes #22696; func strutils.join for non-strings uses proc $ which can have side effects (#22770)

fixes #22696
partially revert https://github.com/nim-lang/Nim/pull/16281

`join` calls `$` interally, which might introduce a sideeffect call.
This commit is contained in:
ringabout
2023-09-30 12:27:27 +08:00
committed by GitHub
parent 0c179db657
commit 5eeafbf550

View File

@@ -1875,7 +1875,7 @@ func join*(a: openArray[string], sep: string = ""): string {.rtl,
else:
result = ""
func join*[T: not string](a: openArray[T], sep: string = ""): string =
proc join*[T: not string](a: openArray[T], sep: string = ""): string =
## Converts all elements in the container `a` to strings using `$`,
## and concatenates them with `sep`.
runnableExamples: