summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 97cf7c5ec..21667895a 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -133,7 +133,8 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
     e.typ = result
     e.position = int(counter)
     let symNode = newSymNode(e)
-    if optNimV1Emulation notin c.config.globalOptions and identToReplace != nil:
+    if optNimV1Emulation notin c.config.globalOptions and identToReplace != nil and
+        c.config.cmd != cmdDoc: # A hack to produce documentation for enum fields.
       identToReplace[] = symNode
     if e.position == 0: hasNull = true
     if result.sym != nil and sfExported in result.sym.flags:
al_tests?id=dcfa2d04cace094775ba4fd468a75ed2831ebcc6'>dcfa2d0 ^
5d8e7a3 ^


bb9e23a ^
5d8e7a3 ^
dcfa2d0 ^

7e6705a ^







c28f6ba ^
ce94f8b ^
7e6705a ^
c28f6ba ^
10c9618 ^


bb9e23a ^
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
36
37