mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 08:51:21 +00:00
fixes missing 'illegal capture' error message regression
This commit is contained in:
@@ -246,11 +246,11 @@ proc liftIterSym(n: PNode; owner: PSym): PNode =
|
||||
# ------------------ new stuff -------------------------------------------
|
||||
|
||||
proc markAsClosure(owner: PSym; n: PNode) =
|
||||
owner.typ.callConv = ccClosure
|
||||
incl(owner.typ.flags, tfCapturesEnv)
|
||||
let s = n.sym
|
||||
if illegalCapture(s) or owner.typ.callConv notin {ccClosure, ccDefault}:
|
||||
localError(n.info, errIllegalCaptureX, s.name.s)
|
||||
incl(owner.typ.flags, tfCapturesEnv)
|
||||
owner.typ.callConv = ccClosure
|
||||
|
||||
type
|
||||
DetectionPass = object
|
||||
|
||||
Reference in New Issue
Block a user