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

@ -246,6 +246,8 @@ proc generateInstance(c: PContext, fn: PSym, pt: TIdTable,
inc i
pushProcCon(c, result)
instantiateProcType(c, pt, result, info)
if tfTriggersCompileTime in result.typ.flags:
incl(result.flags, sfCompileTime)
n.sons[genericParamsPos] = ast.emptyNode
var oldPrc = genericCacheGet(fn, entry[])
if oldPrc == nil: