* Fix #14647 * Correct fix * Typo and add test * For real now :p
This commit is contained in:
parent
037990bc78
commit
394a56650a
3 changed files with 12 additions and 9 deletions
|
|
@ -1777,11 +1777,6 @@ proc genModule(m: BModule, cfile: Cfile): Rope =
|
||||||
if moduleIsEmpty:
|
if moduleIsEmpty:
|
||||||
result = nil
|
result = nil
|
||||||
|
|
||||||
proc newPreInitProc(m: BModule): BProc =
|
|
||||||
result = newProc(nil, m)
|
|
||||||
# little hack so that unique temporaries are generated:
|
|
||||||
result.labels = 100_000
|
|
||||||
|
|
||||||
proc initProcOptions(m: BModule): TOptions =
|
proc initProcOptions(m: BModule): TOptions =
|
||||||
let opts = m.config.options
|
let opts = m.config.options
|
||||||
if sfSystemModule in m.module.flags: opts-{optStackTrace} else: opts
|
if sfSystemModule in m.module.flags: opts-{optStackTrace} else: opts
|
||||||
|
|
@ -1802,7 +1797,9 @@ proc rawNewModule(g: BModuleList; module: PSym, filename: AbsoluteFile): BModule
|
||||||
result.sigConflicts = initCountTable[SigHash]()
|
result.sigConflicts = initCountTable[SigHash]()
|
||||||
result.initProc = newProc(nil, result)
|
result.initProc = newProc(nil, result)
|
||||||
result.initProc.options = initProcOptions(result)
|
result.initProc.options = initProcOptions(result)
|
||||||
result.preInitProc = newPreInitProc(result)
|
result.preInitProc = newProc(nil, result)
|
||||||
|
result.preInitProc.flags.incl nimErrorFlagDisabled
|
||||||
|
result.preInitProc.labels = 100_000 # little hack so that unique temporaries are generated
|
||||||
initNodeTable(result.dataCache)
|
initNodeTable(result.dataCache)
|
||||||
result.typeStack = @[]
|
result.typeStack = @[]
|
||||||
result.typeNodesName = getTempName(result)
|
result.typeNodesName = getTempName(result)
|
||||||
|
|
|
||||||
|
|
@ -189,8 +189,8 @@ proc newProc*(prc: PSym, module: BModule): BProc =
|
||||||
new(result)
|
new(result)
|
||||||
result.prc = prc
|
result.prc = prc
|
||||||
result.module = module
|
result.module = module
|
||||||
if prc != nil: result.options = prc.options
|
result.options = if prc != nil: prc.options
|
||||||
else: result.options = module.config.options
|
else: module.config.options
|
||||||
newSeq(result.blocks, 1)
|
newSeq(result.blocks, 1)
|
||||||
result.nestedTryStmts = @[]
|
result.nestedTryStmts = @[]
|
||||||
result.finallySafePoints = @[]
|
result.finallySafePoints = @[]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ swallowed
|
||||||
before
|
before
|
||||||
swallowed B
|
swallowed B
|
||||||
'''
|
'''
|
||||||
cmd: "nim c --gc:arc --exceptions:goto $file"
|
cmd: "nim c --gc:arc --exceptions:goto -d:ssl $file"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #13599
|
# bug #13599
|
||||||
|
|
@ -37,3 +37,9 @@ try:
|
||||||
mainB()
|
mainB()
|
||||||
except:
|
except:
|
||||||
echo "swallowed B"
|
echo "swallowed B"
|
||||||
|
|
||||||
|
# bug #14647
|
||||||
|
import httpclient
|
||||||
|
|
||||||
|
newAsyncHttpClient().close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue