diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-03-09 17:06:29 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-03-09 17:06:29 +0200 |
commit | eebe0035b5d16d82a3806ff6c3d29935e771226b (patch) | |
tree | 3670b901a7ec5d1b8a040a31c3a4b2be676309c3 /tests/vm | |
parent | 1793a0b5cefda62d49d584bd12cc1fc6a40f1438 (diff) | |
download | Nim-eebe0035b5d16d82a3806ff6c3d29935e771226b.tar.gz |
teach opcLdObj about nkExprColonExpr
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tstaticprintseq.nim | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/vm/tstaticprintseq.nim b/tests/vm/tstaticprintseq.nim index f7ed1e2bb..4575f3af1 100644 --- a/tests/vm/tstaticprintseq.nim +++ b/tests/vm/tstaticprintseq.nim @@ -10,28 +10,31 @@ discard """ 3 1 2 -3''' +3 +aa +bb +aa +bb''' """ -when false: - const s = @[1,2,3] +const s = @[1,2,3] - macro foo: stmt = - for e in s: - echo e +macro foo: stmt = + for e in s: + echo e - foo() +foo() - static: - for e in s: - echo e +static: + for e in s: + echo e - macro bar(x: static[seq[int]]): stmt = - for e in x: - echo e +macro bar(x: static[seq[int]]): stmt = + for e in x: + echo e - bar s - bar(@[1, 2, 3]) +bar s +bar(@[1, 2, 3]) type TData = tuple @@ -41,9 +44,6 @@ type const data: TData = (@["aa", "bb"], @[11, 22]) static: - for x in data.letters: - echo x - var m = data for x in m.letters: echo x |