summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-12-06 04:04:41 +0800
committerGitHub <noreply@github.com>2023-12-05 21:04:41 +0100
commitd20b4d5168780b9c6a3bd2fde28b171cb7414c98 (patch)
tree10c1f7802870f27026a78729473439218c67f1f6 /compiler
parent202e21daba1424762cf330effb52220c6f1d5772 (diff)
downloadNim-d20b4d5168780b9c6a3bd2fde28b171cb7414c98.tar.gz
fixes #23019; Regression from 2.0 to devel with raise an unlisted exc… (#23034)
…eption: Exception

fixes #23019

I suppose `implicitPragmas` is called somewhere which converts
`otherPragmas`.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/pragmas.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index d4817ce7a..a800edaf8 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -1313,7 +1313,7 @@ proc implicitPragmas*(c: PContext, sym: PSym, info: TLineInfo,
   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: # bug #23019
         pushInfoContext(c.config, info)
         var i = 0
         while i < o.len: