[Mono-bugs] [Bug 75674][Maj] Changed - Iterators generated local access to captured caught variables.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jul 31 23:02:29 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 miguel at ximian.com.


--- shadow/75674	2005-07-31 01:30:20.000000000 -0400
+++ shadow/75674.tmp.31514	2005-07-31 23:02:29.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 75674
 Product: Mono: Compilers
 Version: unspecified
+OS: unknown
 OS Details: 
-Status: NEW   
+Status: RESOLVED   
+Resolution: FIXED
+Severity: Unknown
 Priority: Major
 Component: C#
 AssignedTo: martin at ximian.com                            
 ReportedBy: miguel at ximian.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -60,6 +60,21 @@
               IL_001c:  leave IL_0022
             } // end handler 0
 The `stloc' there is hardcoded somehwere, but it should store the data into
 the XX/<X>__0::e field instead of the local
+------- Additional Comments From miguel at ximian.com  2005-07-31 23:02 -------
+I applied the following patch, but I would like you to check whether
+this makes sense, with your nice revamp of the code in foreach for
+I added the following code immediately after the exception is caught:
+ig.Emit (OpCodes.Stloc, vi.LocalBuilder);
+if (vi.IsCaptured){
+	ec.EmitCapturedVariableInstance (vi);
+	ig.Emit (OpCodes.Ldloc, vi.LocalBuilder);
+	ig.Emit (OpCodes.Stfld, vi.FieldBuilder);

More information about the mono-bugs mailing list