diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-06-07 23:29:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 23:29:26 +0200 |
commit | 754a196d4739b17fc0783d8e4b025d38bbcc4e32 (patch) | |
tree | adf883f4c73662e2c485a47b140b8624287490ae /compiler | |
parent | 419dbd573d91c493f80c75fa23fae1dd6fece18e (diff) | |
download | Nim-754a196d4739b17fc0783d8e4b025d38bbcc4e32.tar.gz |
fixes #14315 (#14594)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semtypinst.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 257094289..15a63e75e 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -390,7 +390,6 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType = let bbody = lastSon body var newbody = replaceTypeVarsT(cl, bbody) - let bodyIsNew = newbody != bbody cl.skipTypedesc = oldSkipTypedesc newbody.flags = newbody.flags + (t.flags + body.flags - tfInstClearedFlags) result.flags = result.flags + newbody.flags - tfInstClearedFlags @@ -412,7 +411,7 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType = # generics *when the type is constructed*: newbody.attachedOps[attachedDeepCopy] = cl.c.instTypeBoundOp(cl.c, dc, result, cl.info, attachedDeepCopy, 1) - if bodyIsNew and newbody.typeInst == nil: + if newbody.typeInst == nil: #doassert newbody.typeInst == nil newbody.typeInst = result if tfRefsAnonObj in newbody.flags and newbody.kind != tyGenericInst: |