mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
fixes #22696
partially revert https://github.com/nim-lang/Nim/pull/16281
`join` calls `$` interally, which might introduce a sideeffect call.
(cherry picked from commit 5eeafbf550)
This commit is contained in:
@@ -1852,7 +1852,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:
|
||||
|
||||
Reference in New Issue
Block a user