From 43de61f37bb058968f443904c9998dea507ebab2 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 29 Jun 2013 09:08:57 +0200 Subject: [PATCH] bugfix: pragmas allowed for implicit generics --- compiler/semdata.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 4c94d08129..72d5a5fefc 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -187,9 +187,9 @@ proc newLib(kind: TLibKind): PLib = new(result) result.kind = kind #initObjectSet(result.syms) -proc addToLib(lib: PLib, sym: PSym) = - #ObjectSetIncl(lib.syms, sym); - if sym.annex != nil: LocalError(sym.info, errInvalidPragma) +proc addToLib(lib: PLib, sym: PSym) = + #if sym.annex != nil and not isGenericRoutine(sym): + # LocalError(sym.info, errInvalidPragma) sym.annex = lib proc makePtrType(c: PContext, baseType: PType): PType =