Mercurial > projects > ldc
annotate tests/mini/foreach3.d @ 1623:1d48eced441f
Merge DMD r317: bugzilla 3611 Enum forward referencing regression
---
dmd/enum.c | 17 +++++++++++++++--
dmd/mtype.c | 4 ++++
2 files changed, 19 insertions(+), 2 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:22 -0300 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
34 | 1 module foreach3; |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
34
diff
changeset
|
2 extern(C) int printf(char*, ...); |
34 | 3 void main() |
4 { | |
5 static str = ['h','e','l','l','o']; | |
6 foreach(i,v; str) { | |
7 printf("%c",v); | |
8 } | |
9 printf("\n"); | |
10 | |
11 foreach(i,v; str) { | |
12 v++; | |
13 } | |
14 | |
15 foreach(i,v; str) { | |
16 printf("%c",v); | |
17 } | |
18 printf("\n"); | |
19 } |