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

@ -1132,6 +1132,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
# semParamList(c, n.sons[ParamsPos], nil, s)
else:
s.typ = newProcType(c, n.info)
if tfTriggersCompileTime in s.typ.flags: incl(s.flags, sfCompileTime)
if n.sons[patternPos].kind != nkEmpty:
n.sons[patternPos] = semPattern(c, n.sons[patternPos])
if s.kind in skIterators: