usage of NimNode triggers .compileTime context; fixes #1679

This commit is contained in:
Araq 2015-09-14 12:41:49 +02:00
commit 612cd25d5d
5 changed files with 16 additions and 2 deletions

View file

@ -1375,7 +1375,8 @@ proc processMagicType(c: PContext, m: PSym) =
of mOrdinal:
setMagicType(m, tyOrdinal, 0)
rawAddSon(m.typ, newTypeS(tyNone, c))
of mPNimrodNode: discard
of mPNimrodNode:
incl m.typ.flags, tfTriggersCompileTime
of mShared:
setMagicType(m, tyObject, 0)
m.typ.n = newNodeI(nkRecList, m.info)