diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-12-26 20:20:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-26 13:20:05 +0100 |
commit | f7c203fb6c89b5cef83c4f326aeb23ef8c4a2c40 (patch) | |
tree | 62d6354e81eb0eb15f22bb3189f6e9d2f4ed27c0 /lib/std/private | |
parent | b08c50bb553364eec1e20ab788d990b63f4548e0 (diff) | |
download | Nim-f7c203fb6c89b5cef83c4f326aeb23ef8c4a2c40.tar.gz |
remove legacy code (#21134)
* remove legacy code * fixes
Diffstat (limited to 'lib/std/private')
-rw-r--r-- | lib/std/private/miscdollars.nim | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/std/private/miscdollars.nim b/lib/std/private/miscdollars.nim index 47b788ee9..06fda6fa1 100644 --- a/lib/std/private/miscdollars.nim +++ b/lib/std/private/miscdollars.nim @@ -13,21 +13,7 @@ template toLocation*(result: var string, file: string | cstring, line: int, col: addInt(result, col) result.add ")" -when defined(nimHasIsNamedTuple): - proc isNamedTuple(T: typedesc): bool {.magic: "TypeTrait".} -else: - # for bootstrap; remove after release 1.2 - proc isNamedTuple(T: typedesc): bool = - # Taken from typetraits. - when T isnot tuple: result = false - else: - var t: T - for name, _ in t.fieldPairs: - when name == "Field0": - return compiles(t.Field0) - else: - return true - return false +proc isNamedTuple(T: typedesc): bool {.magic: "TypeTrait".} template tupleObjectDollar*[T: tuple | object](result: var string, x: T) = result = "(" |