Fixes #20348; only respect the recursion limit if the symbol's generic type has been generated by the compiler (#20377)

Fixes #20348
This commit is contained in:
Aditya Siram 2022-09-22 13:19:36 -05:00 • committed by GitHub
commit be4bd8a0ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 145 additions and 12 deletions

View file

@ -1425,6 +1425,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
excl(objTy.flags, tfFinal)
let obj = newSym(skType, getIdent(c.cache, s.name.s & ":ObjectType"),
nextSymId c.idgen, getCurrOwner(c), s.info)
obj.flags.incl sfGeneratedType
let symNode = newSymNode(obj)
obj.ast = a.shallowCopy
case a[0].kind