mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-19 11:07:14 +00:00
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2) fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim * Note: isNamedTuple is useful in other places, eg #10010 (comment) * move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim * remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
8 lines
315 B
Nim
8 lines
315 B
Nim
# imported by other modules, unlike helpers.nim which is included
|
|
|
|
template formatErrorIndexBound*[T](i, a, b: T): string =
|
|
"index out of bounds: (a:" & $a & ") <= (i:" & $i & ") <= (b:" & $b & ") "
|
|
|
|
template formatErrorIndexBound*[T](i, n: T): string =
|
|
"index out of bounds: (i:" & $i & ") <= (n:" & $n & ") "
|