breaking change: disallow .closure procs for const

This commit is contained in:
Andreas Rumpf 2015-12-29 15:42:12 +01:00
commit b6c18e4bba
2 changed files with 8 additions and 5 deletions

View file

@ -202,7 +202,7 @@ proc typeAllowedCheck(info: TLineInfo; typ: PType; kind: TSymKind) =
"' in this context: '" & typeToString(typ) & "'")
proc paramsTypeCheck(c: PContext, typ: PType) {.inline.} =
typeAllowedCheck(typ.n.info, typ, skConst)
typeAllowedCheck(typ.n.info, typ, skProc)
proc expectMacroOrTemplateCall(c: PContext, n: PNode): PSym
proc semDirectOp(c: PContext, n: PNode, flags: TExprFlags): PNode