diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-01-05 18:07:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 11:07:27 +0100 |
commit | 3dee1a3e4c81448b67b75068fef06a121f320758 (patch) | |
tree | 04c67ab671542b86e61d13e37cda3e098739b33a /lib/system | |
parent | 74fa8ed59a15caa2ee91f9e559b37728618c3865 (diff) | |
download | Nim-3dee1a3e4c81448b67b75068fef06a121f320758.tar.gz |
fixes #23139; Cannot get repr of range type of enum (#23164)
fixes #23139
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/repr_v2.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/repr_v2.nim b/lib/system/repr_v2.nim index f81c615e9..a486cb224 100644 --- a/lib/system/repr_v2.nim +++ b/lib/system/repr_v2.nim @@ -99,7 +99,7 @@ proc repr*(p: proc | iterator {.closure.}): string = ## repr of a proc as its address repr(cast[ptr pointer](unsafeAddr p)[]) -template repr*[T: distinct|range](x: T): string = +template repr*[T: distinct|(range and not enum)](x: T): string = when T is range: # add a branch to handle range repr(rangeBase(typeof(x))(x)) elif T is distinct: |