IC: bugfixes (WIP) (#16836)

* minor improvements
* IC: added the required logic for compilerProcs
* LazySym ftw
* we need this testing logic
* reimplement the old way we use for module package creation
* fixes a regression; don't pick module names if you can avoid it
This commit is contained in:
Andreas Rumpf 2021-02-02 19:24:55 +01:00 • committed by GitHub
commit fb80d2ff85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 283 additions and 98 deletions

View file

@ -151,7 +151,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
wrongRedefinition(c, e.info, e.name.s, conflict.info)
inc(counter)
if isPure and sfExported in result.sym.flags:
addPureEnum(c, result.sym)
addPureEnum(c, LazySym(sym: result.sym))
if tfNotNil in e.typ.flags and not hasNull:
result.flags.incl tfRequiresInit
setToStringProc(c.graph, result, genEnumToStrProc(result, n.info, c.graph, c.idgen))