fix getTypeImpl for tyEnum (#5568)

* fixed getTypeImpl for tyEnum
* fixed getType for enum and updated release notes about change
This commit is contained in:
jcosborn 2017-03-19 14:34:27 -05:00 • committed by Andreas Rumpf
commit 3bffb3ba35
2 changed files with 7 additions and 1 deletions

View file

@ -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)