[Mono-bugs] [Bug 75689][Nor] Changed - another anonymous
delegate/foreach bug
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 29 11:19:01 EDT 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 danw at novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75689
--- shadow/75689 2005-08-29 10:44:48.000000000 -0400
+++ shadow/75689.tmp.6850 2005-08-29 11:19:01.000000000 -0400
@@ -11,13 +11,13 @@
AssignedTo: mono-bugs at ximian.com
ReportedBy: danw at novell.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: another anonymous delegate bug
+Summary: another anonymous delegate/foreach bug
using System;
using System.Collections;
public class Foo {
int n;
@@ -69,6 +69,15 @@
------- Additional Comments From atsushi at ximian.com 2005-08-29 10:44 -------
I think it is the expected behavior. I tried ms.net beta2 and the
result was the same.
Similar example can be seen here.
http://www.theserverside.net/articles/showarticle.tss?id=AnonymousMethods
+
+------- Additional Comments From danw at novell.com 2005-08-29 11:19 -------
+hm. yes, I was misreading the rules about scope and capture.
+
+But in that case, the sense of the bug is just reversed; if you
+comment out the line "Console.WriteLine (msg);", then it
+*incorrectly* captures four separate copies of "foo" rather than
+correctly capturing only a single instance of it.
+
More information about the mono-bugs
mailing list