diff options
author | Martin Baulig <martin@novell.com> | 2005-08-20 21:55:44 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2005-08-20 21:55:44 +0400 |
commit | 411b145c68db97f504f45a76d50419fc60ed5d78 (patch) | |
tree | db4fbc81efe37c52914182c38e7776db44bb4ba8 | |
parent | 9cbf6aefb40fbc5290fa2952e203a8cacf8799b0 (diff) |
*** Merged r47879 from MCS ***
svn path=/trunk/mcs/; revision=48604
-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); |