diff options
-rw-r--r-- | mcs/gmcs/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/gmcs/codegen.cs | 2 | ||||
-rw-r--r-- | mcs/gmcs/statement.cs | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index 14444035948..aad27042bb6 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -1,3 +1,8 @@ +2005-07-31 Miguel de Icaza <miguel@novell.com> + + * statement.cs: Copy the local exception into the exception + captured local. Fixes 75674 + 2005-07-15 Marek Safar <marek.safar@seznam.cz> * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested diff --git a/mcs/gmcs/codegen.cs b/mcs/gmcs/codegen.cs index a821b6a1bdd..47d5240a922 100644 --- a/mcs/gmcs/codegen.cs +++ b/mcs/gmcs/codegen.cs @@ -7,7 +7,7 @@ // (C) 2001, 2002, 2003 Ximian, Inc. // (C) 2004 Novell, Inc. // -//#define PRODUCTION +#define PRODUCTION using System; using System.IO; using System.Collections; diff --git a/mcs/gmcs/statement.cs b/mcs/gmcs/statement.cs index f6c1d940a4c..e1bfe057608 100644 --- a/mcs/gmcs/statement.cs +++ b/mcs/gmcs/statement.cs @@ -3786,6 +3786,11 @@ namespace Mono.CSharp { throw new Exception ("Variable does not exist in this block"); ig.Emit (OpCodes.Stloc, vi.LocalBuilder); + if (vi.IsCaptured){ + ec.EmitCapturedVariableInstance (vi); + ig.Emit (OpCodes.Ldloc, vi.LocalBuilder); + ig.Emit (OpCodes.Stfld, vi.FieldBuilder); + } } else ig.Emit (OpCodes.Pop); |