[Mono-bugs] [Bug 76592][Nor] Changed - anonymous methods draw BPT
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Nov 7 21:54:01 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 miguel at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76592
--- shadow/76592 2005-11-04 10:56:10.000000000 -0500
+++ shadow/76592.tmp.29104 2005-11-07 21:54:01.000000000 -0500
@@ -66,6 +66,30 @@
Its missing a load of the resulting value. Notice that without
capturing the load is present.
+
+------- Additional Comments From miguel at ximian.com 2005-11-07 21:54 -------
+There are two variants of this same bug:
+
+using Console = System.Console;
+
+delegate void Del (int n);
+
+abstract class Lambda {
+
+ static Del[] Make2 (int x) { // create two functions that close on x
+ return new Del[] {
+ delegate (int a) { Console.WriteLine(x += a); },
+ };
+ }
+
+ static void Main () { // use the functions after their environment
+is gone
+ Make2(10)[0](1);
+ }
+}
+
+I got some instrumented code, will try to get a fix.
+
More information about the mono-bugs
mailing list