diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 6596cfba6cbf2..72efc36f518c0 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -1168,7 +1168,7 @@ proc implicitPragmas*(c: PContext, sym: PSym, n: PNode, if sym != nil and sym.kind != skModule: for it in c.optionStack: let o = it.otherPragmas - if not o.isNil: + if not o.isNil and sfFromGeneric notin sym.flags: # see issue #12985 pushInfoContext(c.config, n.info) var i = 0 while i < o.len: