annotate test/foreach6.d @ 51:61bc1b4ad3c4 trunk

[svn r55] Foreach was always generating code as if the value variable was 'ref' Other not-so-major improvements
author lindquist
date Mon, 22 Oct 2007 17:25:44 +0200
parents
children 0c77619e803b
rev   line source
lindquist@51 1 module foreach6;
lindquist@51 2
lindquist@51 3 struct S
lindquist@51 4 {
lindquist@51 5 long l;
lindquist@51 6 float f;
lindquist@51 7 }
lindquist@51 8
lindquist@51 9 void main()
lindquist@51 10 {
lindquist@51 11 S[4] arr;
lindquist@51 12 foreach(i,v;arr) {
lindquist@51 13 v = S(i,i*2.5);
lindquist@51 14 }
lindquist@51 15 }