implemented 'experimental' switch

This commit is contained in:
Araq 2014-12-05 10:09:29 +01:00
commit 4b7de4dc5e
12 changed files with 49 additions and 7 deletions

View file

@ -1433,6 +1433,8 @@ proc newAnonSym(kind: TSymKind, info: TLineInfo,
proc semUsing(c: PContext, n: PNode): PNode =
result = newNodeI(nkEmpty, n.info)
if not experimentalMode(c):
localError(n.info, "use the {.experimental.} pragma to enable 'using'")
for e in n.sons:
let usedSym = semExpr(c, e)
if usedSym.kind == nkSym: