fixes missing 'illegal capture' error message regression
This commit is contained in:
parent
5c9332c57d
commit
9971c06062
1 changed files with 2 additions and 2 deletions
|
|
@ -246,11 +246,11 @@ proc liftIterSym(n: PNode; owner: PSym): PNode =
|
||||||
# ------------------ new stuff -------------------------------------------
|
# ------------------ new stuff -------------------------------------------
|
||||||
|
|
||||||
proc markAsClosure(owner: PSym; n: PNode) =
|
proc markAsClosure(owner: PSym; n: PNode) =
|
||||||
owner.typ.callConv = ccClosure
|
|
||||||
incl(owner.typ.flags, tfCapturesEnv)
|
|
||||||
let s = n.sym
|
let s = n.sym
|
||||||
if illegalCapture(s) or owner.typ.callConv notin {ccClosure, ccDefault}:
|
if illegalCapture(s) or owner.typ.callConv notin {ccClosure, ccDefault}:
|
||||||
localError(n.info, errIllegalCaptureX, s.name.s)
|
localError(n.info, errIllegalCaptureX, s.name.s)
|
||||||
|
incl(owner.typ.flags, tfCapturesEnv)
|
||||||
|
owner.typ.callConv = ccClosure
|
||||||
|
|
||||||
type
|
type
|
||||||
DetectionPass = object
|
DetectionPass = object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue