mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
fixes #23139
(cherry picked from commit 3dee1a3e4c)
This commit is contained in:
@@ -98,7 +98,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:
|
||||
|
||||
Reference in New Issue
Block a user