added -d:nimNoArrayToString define to allow easier porting to 0.18

This commit is contained in:
Araq 2018-03-01 09:42:25 +01:00
commit ce1047f2ae
3 changed files with 27 additions and 7 deletions

View file

@ -3428,10 +3428,10 @@ elif defined(JS):
when defined(nimffi):
include "system/sysio"
proc `$`*[T, IDX](x: array[IDX, T]): string =
## generic ``$`` operator for arrays that is lifted from the components
collectionToString(x, "[", ", ", "]")
when not defined(nimNoArrayToString):
proc `$`*[T, IDX](x: array[IDX, T]): string =
## generic ``$`` operator for arrays that is lifted from the components
collectionToString(x, "[", ", ", "]")
proc quit*(errormsg: string, errorcode = QuitFailure) {.noReturn.} =
## a shorthand for ``echo(errormsg); quit(errorcode)``.