Fix #5888
This commit is contained in:
parent
a6006e56a7
commit
21ce7b2af4
6 changed files with 43 additions and 2 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue