summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2020-10-30 16:30:00 +0100
committerGitHub <noreply@github.com>2020-10-30 16:30:00 +0100
commit28bbcd9d45f15247af347785a46d0c2e2750b8ca (patch)
tree3ad87b9d354a7918fbc5834d131ccbd906700f86 /compiler
parent7364794fedcf8ee20ca5a55f58c14c76dfa31723 (diff)
downloadNim-28bbcd9d45f15247af347785a46d0c2e2750b8ca.tar.gz
fix #15702, show enum fields documentation (#15792)
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: