fixes #3338
This commit is contained in:
parent
3f24a7ff3e
commit
d93507fd2e
4 changed files with 51 additions and 4 deletions
|
|
@ -75,8 +75,12 @@ proc searchInstTypes*(key: PType): PType =
|
|||
proc cacheTypeInst*(inst: PType) =
|
||||
# XXX: add to module's generics
|
||||
# update the refcount
|
||||
let genericTyp = inst.sons[0]
|
||||
genericTyp.sym.typeInstCache.safeAdd(inst)
|
||||
let gt = inst.sons[0]
|
||||
let t = if gt.kind == tyGenericBody: gt.lastSon else: gt
|
||||
if t.kind in {tyStatic, tyGenericParam, tyIter} + tyTypeClasses:
|
||||
return
|
||||
gt.sym.typeInstCache.safeAdd(inst)
|
||||
|
||||
|
||||
type
|
||||
TReplTypeVars* {.final.} = object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue