diff options
author | Araq <rumpf_a@web.de> | 2011-05-14 00:24:52 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-05-14 00:24:52 +0200 |
commit | 32241aa9fe1a22f388124a6e5db8fb0517f01789 (patch) | |
tree | e02126fc683b8e26525e36c573c42576114b4629 /lib/system.nim | |
parent | f45967537f3696b20a4a92b2159c8de11913b556 (diff) | |
download | Nim-32241aa9fe1a22f388124a6e5db8fb0517f01789.tar.gz |
got rid of isLifted
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-x | lib/system.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system.nim b/lib/system.nim index fb43930be..a18412790 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -1229,21 +1229,21 @@ proc each*[T](data: var openArray[T], op: proc (x: var T)) = ## `op` to every item in `data`. for i in 0..data.len-1: op(data[i]) -iterator fields*(x: tuple[]): expr {.magic: "Fields", noSideEffect.} +iterator fields*[T: tuple](x: T): expr {.magic: "Fields", noSideEffect.} ## iterates over every field of `x`. Warning: This is really transforms ## the 'for' and unrolls the loop. The current implementation also has a bug ## that affects symbol binding in the loop body. -iterator fields*(x, y: tuple[]): tuple[a, b: expr] {. +iterator fields*[S: tuple, T: tuple](x: S, y: T): tuple[a, b: expr] {. magic: "Fields", noSideEffect.} ## iterates over every field of `x` and `y`. ## Warning: This is really transforms the 'for' and unrolls the loop. ## The current implementation also has a bug that affects symbol binding ## in the loop body. -iterator fieldPairs*(x: tuple[]): expr {.magic: "FieldPairs", noSideEffect.} +iterator fieldPairs*[T: tuple](x: T): expr {.magic: "FieldPairs", noSideEffect.} ## iterates over every field of `x`. Warning: This is really transforms ## the 'for' and unrolls the loop. The current implementation also has a bug ## that affects symbol binding in the loop body. -iterator fieldPairs*(x, y: tuple[]): tuple[a, b: expr] {. +iterator fieldPairs*[S: tuple, T: tuple](x: S, y: T): tuple[a, b: expr] {. magic: "FieldPairs", noSideEffect.} ## iterates over every field of `x` and `y`. ## Warning: This is really transforms the 'for' and unrolls the loop. |