fixes #16897 [backport:1.2] (#16900)

This commit is contained in:
Andreas Rumpf 2021-02-01 16:56:02 +01:00 • committed by GitHub
commit 91ace2188a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ const
tyInferred, tySink, tyLent, tyOwned} tyInferred, tySink, tyLent, tyOwned}
# typedescX is used if we're sure tyTypeDesc should be included (or skipped) # typedescX is used if we're sure tyTypeDesc should be included (or skipped)
typedescPtrs* = abstractPtrs + {tyTypeDesc} typedescPtrs* = abstractPtrs + {tyTypeDesc}
typedescInst* = abstractInst + {tyTypeDesc, tyOwned} typedescInst* = abstractInst + {tyTypeDesc, tyOwned, tyUserTypeClass}
proc invalidGenericInst*(f: PType): bool = proc invalidGenericInst*(f: PType): bool =
result = f.kind == tyGenericInst and lastSon(f) == nil result = f.kind == tyGenericInst and lastSon(f) == nil