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=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: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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. + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
