From 3dee1a3e4c81448b67b75068fef06a121f320758 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:07:27 +0800 Subject: fixes #23139; Cannot get repr of range type of enum (#23164) fixes #23139 --- lib/system/repr_v2.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/system') 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: -- cgit 1.4.1-2-gfad0 n> This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/tools/nimgrab.nim
blob: ee5eced1eb9e44df7146e0c861d5b4453729f83f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35