Mercurial > projects > ldc
annotate tests/mini/bug60.d @ 341:1bb99290e03a trunk
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author | lindquist |
---|---|
date | Sun, 13 Jul 2008 02:51:19 +0200 |
parents | test/bug60.d@d9d5d59873d8 |
children |
rev | line source |
---|---|
lindquist@94 | 1 module bug60; |
lindquist@270 | 2 extern(C) int printf(char*, ...); |
lindquist@270 | 3 |
lindquist@94 | 4 void func(T...)(T t) |
lindquist@94 | 5 { |
lindquist@94 | 6 foreach(v;t) { |
lindquist@94 | 7 if (v.length) { |
lindquist@94 | 8 foreach(i;v) { |
lindquist@94 | 9 printf("%d\n", i); |
lindquist@94 | 10 } |
lindquist@94 | 11 } |
lindquist@94 | 12 } |
lindquist@94 | 13 } |
lindquist@94 | 14 void main() |
lindquist@94 | 15 { |
lindquist@94 | 16 auto a = [1,2,3]; |
lindquist@94 | 17 func(a); |
lindquist@94 | 18 } |