diff options
author | Araq <rumpf_a@web.de> | 2014-08-31 01:07:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-31 01:07:58 +0200 |
commit | 09ab1703e1bccfafe25460e1e7b9f332823bd4e9 (patch) | |
tree | 7c066e80a62c4535178477615629f5a8a7382afb /lib/system.nim | |
parent | c9563d28a8ef3ef74826d4c211cac13301963dd5 (diff) | |
download | Nim-09ab1703e1bccfafe25460e1e7b9f332823bd4e9.tar.gz |
fixes #1444
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim index 082b3ad40..2ad5e6af9 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -874,13 +874,13 @@ proc contains*[T](s: Slice[T], value: T): bool {.noSideEffect, inline.} = ## assert((1..3).contains(4) == false) result = s.a <= value and value <= s.b -template `in` * (x, y: expr): expr {.immediate.} = contains(y, x) +template `in` * (x, y: expr): expr {.immediate, dirty.} = contains(y, x) ## Sugar for contains ## ## .. code-block:: Nim ## assert(1 in (1..3) == true) ## assert(5 in (1..3) == false) -template `notin` * (x, y: expr): expr {.immediate.} = not contains(y, x) +template `notin` * (x, y: expr): expr {.immediate, dirty.} = not contains(y, x) ## Sugar for not containing ## ## .. code-block:: Nim |