* fixes #21261; always checking nimTestErrorFlag in the main module * add a test
This commit is contained in:
parent
5e7f7109e1
commit
d54a7f078d
3 changed files with 13 additions and 0 deletions
|
|
@ -1801,6 +1801,9 @@ proc genInitCode(m: BModule) =
|
|||
|
||||
if optStackTrace in m.initProc.options and preventStackTrace notin m.flags:
|
||||
prc.add(deinitFrame(m.initProc))
|
||||
elif sfMainModule in m.module.flags and m.config.exc == excGoto:
|
||||
if getCompilerProc(m.g.graph, "nimTestErrorFlag") != nil:
|
||||
m.appcg(prc, "\t#nimTestErrorFlag();$n", [])
|
||||
|
||||
prc.addf("}$N", [])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue