From b6a11271b30c44e86bb3c4dbc1a8f67741e29cf5 Mon Sep 17 00:00:00 2001 From: bit Date: Mon, 22 Feb 2016 16:03:45 +0200 Subject: [PATCH] Removed error that disallows slices with negative indexes --- compiler/semmagic.nim | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index f98ff02660..1a70e4a12b 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -178,10 +178,6 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode, result.typ = n[1].typ of mDotDot: result = n - # disallow negative indexing for now: - if not c.p.bracketExpr.isNil: - if isNegative(n.sons[1]) or (n.len > 2 and isNegative(n.sons[2])): - localError(n.info, "use '^' instead of '-'; negative indexing is obsolete") of mRoof: let bracketExpr = if n.len == 3: n.sons[2] else: c.p.bracketExpr if bracketExpr.isNil: