From bb532a697edad1bac60a87a7ff43956c9635973d Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 20 Nov 2014 21:02:51 +0100 Subject: fixes #1562, fixes #1543 --- compiler/sem.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/sem.nim') diff --git a/compiler/sem.nim b/compiler/sem.nim index 81846e1b4..5b31129a5 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -142,8 +142,8 @@ proc newSymS(kind: TSymKind, n: PNode, c: PContext): PSym = proc newSymG*(kind: TSymKind, n: PNode, c: PContext): PSym = # like newSymS, but considers gensym'ed symbols if n.kind == nkSym: + # and sfGenSym in n.sym.flags: result = n.sym - internalAssert sfGenSym in result.flags internalAssert result.kind == kind # when there is a nested proc inside a template, semtmpl # will assign a wrong owner during the first pass over the -- cgit 1.4.1-2-gfad0