diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 61a74a9710..2bd769ef6a 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -578,6 +578,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = result.kind = tyUserTypeClassInst of tyGenericBody: + if cl.allowMetaTypes: return localError( cl.c.config, cl.info, @@ -651,7 +652,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = for i in 0..