diff options
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r-- | compiler/semtypinst.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 4f1f420a8..75dffb67f 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -314,7 +314,9 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType = if bodyIsNew and newbody.typeInst == nil: #doassert newbody.typeInst == nil newbody.typeInst = result - if tfRefsAnonObj in newbody.flags: + if tfRefsAnonObj in newbody.flags and newbody.kind != tyGenericInst: + # can come here for tyGenericInst too, see tests/metatype/ttypeor.nim + # need to look into this issue later assert newbody.kind in {tyRef, tyPtr} assert newbody.lastSon.typeInst == nil newbody.lastSon.typeInst = result |