[Mono-bugs] [Bug 76948][Nor] Changed - closures don't capture local vars correctly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Dec 9 10:31:47 EST 2005


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 jonpryor at vt.edu.

http://bugzilla.ximian.com/show_bug.cgi?id=76948

--- shadow/76948	2005-12-09 08:08:22.000000000 -0500
+++ shadow/76948.tmp.22700	2005-12-09 10:31:47.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 76948
 Product: Mono: Compilers
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: rharinath at novell.com                            
 ReportedBy: lupus at ximian.com               
 QAContact: mono-bugs at ximian.com
@@ -51,6 +51,16 @@
         int v = i;
         arr [i] = delegate {doit (v);};
     }
 
 At least, this is what would make sense to me, as I haven't tested
 this on CSC.EXE either.
+
+------- Additional Comments From jonpryor at vt.edu  2005-12-09 10:31 -------
+evarlast on #mono executed the test program under .NET 2.0 and got the
+same results as mono: 5 printed 5 times, so I'm probably correct about
+`i' being shared between all of the anonymous delegates.
+
+As expected, my modified version prints the desired output of 0 .. 4.
+
+Closing as NOTABUG.
+


More information about the mono-bugs mailing list