Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=76874 --- shadow/76874 2005-12-01 19:00:37.000000000 -0500 +++ shadow/76874.tmp.32518 2005-12-01 19:00:37.000000000 -0500 @@ -0,0 +1,47 @@ +Bug#: 76874 +Product: Mono: Compilers +Version: unspecified +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: mcs lets structs as iteration variables in a foreach loop. csc does not + +Description of Problem: + +mcs lets structs as iteration variables in a foreach loop. csc does not + +Example of code: + +using System.Drawing; + ... +Point[] puntos=new Point[64]; +System.Random r=new Random(); +foreach(Point p in puntos) +{ +p.X=r.Next(this.Width);//A +p.Y=r.Next(this.Height);//B +} + ... + +Actual Results: + +- compiles ok for mcs.//wrong perform +- does not compile for csc // right perform + +mcs version: 1.1.10.0 +csc version: 1.1.4322 + +Expected Results: + +- two compilation erros:lines A and B: Cannot modify members of 'p' because +it is a 'foreach iteration variable' _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
