This commit is contained in:
Zahary Karadjov 2017-06-19 22:45:15 +03:00 • committed by Andreas Rumpf
commit 21ce7b2af4
6 changed files with 43 additions and 2 deletions

View file

@ -467,6 +467,8 @@ proc hasEmpty(typ: PType): bool =
proc makeDeref(n: PNode): PNode =
var t = skipTypes(n.typ, {tyGenericInst, tyAlias})
if t.kind in tyUserTypeClasses and t.isResolvedUserTypeClass:
t = t.lastSon
result = n
if t.kind == tyVar:
result = newNodeIT(nkHiddenDeref, n.info, t.sons[0])