fix #6462
This commit is contained in:
parent
057d5789ba
commit
2ceee884fe
3 changed files with 27 additions and 2 deletions
|
|
@ -441,9 +441,10 @@ proc hasEmpty(typ: PType): bool =
|
|||
result = result or hasEmpty(s)
|
||||
|
||||
proc makeDeref(n: PNode): PNode =
|
||||
var t = skipTypes(n.typ, {tyGenericInst, tyAlias})
|
||||
var t = n.typ
|
||||
if t.kind in tyUserTypeClasses and t.isResolvedUserTypeClass:
|
||||
t = t.lastSon
|
||||
t = skipTypes(t, {tyGenericInst, tyAlias})
|
||||
result = n
|
||||
if t.kind == tyVar:
|
||||
result = newNodeIT(nkHiddenDeref, n.info, t.sons[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue