summary refs log tree commit diff stats
path: root/compiler/vmdeps.nim
diff options
context:
space:
mode:
authorjcosborn <jcosborn@users.noreply.github.com>2017-03-19 14:34:27 -0500
committerAndreas Rumpf <rumpf_a@web.de>2017-03-19 20:34:27 +0100
commit3bffb3ba35be45a32b622a6dbfc8c501001e7dfb (patch)
treef80a5164e979087626c1166c33c01aee7dd1a7e6 /compiler/vmdeps.nim
parent1d6018726eea88b8cd7bf9a9bc975525f083e4d1 (diff)
downloadNim-3bffb3ba35be45a32b622a6dbfc8c501001e7dfb.tar.gz
fix getTypeImpl for tyEnum (#5568)
* fixed getTypeImpl for tyEnum
* fixed getType for enum and updated release notes about change
Diffstat (limited to 'compiler/vmdeps.nim')
-rw-r--r--compiler/vmdeps.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim
index 779d6d2a4..d684c4c32 100644
--- a/compiler/vmdeps.nim
+++ b/compiler/vmdeps.nim
@@ -214,7 +214,9 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
         result = atomicType(t.sym)
   of tyEnum:
     result = newNodeIT(nkEnumTy, if t.n.isNil: info else: t.n.info, t)
-    result.add copyTree(t.n)
+    result.add ast.emptyNode  # pragma node, currently always empty for enum
+    for c in t.n.sons:
+      result.add copyTree(c)
   of tyTuple:
     if inst:
       result = newNodeX(nkTupleTy)