* fix #20253

* change NimbleStableCommit

* Update koch.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Bung 2023-01-13 06:36:13 -08:00 • committed by GitHub
commit 5f41be3b45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -1488,7 +1488,10 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
s.kind in {skProc, skFunc, skConverter, skMethod} and s.magic == mNone:
var res = s.ast[resultPos].sym # get result symbol
if res.id notin t.init:
message(g.config, body.info, warnProveInit, "result")
if tfRequiresInit in s.typ[0].flags:
localError(g.config, body.info, "'$1' requires explicit initialization" % "result")
else:
message(g.config, body.info, warnProveInit, "result")
let p = s.ast[pragmasPos]
let raisesSpec = effectSpec(p, wRaises)
if not isNil(raisesSpec):