diff options
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r-- | compiler/semtypinst.nim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index ac14179cd..1158335a8 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -116,8 +116,8 @@ proc hasGenericArguments*(n: PNode): bool = (n.sym.kind == skType and n.sym.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {}) else: - for s in n.sons: - if hasGenericArguments(s): return true + for i in 0.. <n.safeLen: + if hasGenericArguments(n.sons[i]): return true return false proc reResolveCallsWithTypedescParams(cl: var TReplTypeVars, n: PNode): PNode = @@ -360,7 +360,10 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = if tfUnresolved in t.flags: result = result.base elif t.sonsLen > 0: result = makeTypeDesc(cl.c, replaceTypeVarsT(cl, t.sons[0])) - + + of tyUserTypeClass: + result = t + of tyGenericInst: result = instCopyType(cl, t) for i in 1 .. <result.sonsLen: |