* fixes #5170

* make tests green
This commit is contained in:
Andreas Rumpf 2020-03-05 16:02:34 +01:00 • committed by GitHub
commit 83e715c5b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 15 deletions

View file

@ -1298,6 +1298,8 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
checkConstructedType(c.config, s.info, s.typ)
if s.typ.kind in {tyObject, tyTuple} and not s.typ.n.isNil:
checkForMetaFields(c, s.typ.n)
# fix bug #5170: ensure locally scoped object types get a unique name:
if s.typ.kind == tyObject and not isTopLevel(c): incl(s.flags, sfGenSym)
#instAllTypeBoundOp(c, n.info)