diff options
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 03c9127af..fd721e1e5 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -864,7 +864,9 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, incl(sym.flags, sfSideEffect) of wNoreturn: noVal(c, it) - incl(sym.flags, sfNoReturn) + # Disable the 'noreturn' annotation when in the "Quirky Exceptions" mode! + if not isDefined(c.config, "nimQuirky"): + incl(sym.flags, sfNoReturn) if sym.typ[0] != nil: localError(c.config, sym.ast[paramsPos][0].info, ".noreturn with return type not allowed") |