Author: martin
Date: 2006-11-29 12:12:59 -0500 (Wed, 29 Nov 2006)
New Revision: 68674
Modified:
branches/martin/anonymous-methods2/mcs/anonymous.cs
Log:
Small fix.
Modified: branches/martin/anonymous-methods2/mcs/anonymous.cs
===================================================================
--- branches/martin/anonymous-methods2/mcs/anonymous.cs 2006-11-29 17:10:08 UTC
(rev 68673)
+++ branches/martin/anonymous-methods2/mcs/anonymous.cs 2006-11-29 17:12:59 UTC
(rev 68674)
@@ -327,8 +327,11 @@
Report.Debug (128, "CAPTURE SCOPE", this, GetType (),
child, child.GetType ());
if (child == this)
throw new InternalErrorException ();
- CapturedScope captured = new CapturedScope (this,
child);
- captured_scopes.Add (child, captured);
+ CapturedScope captured = (CapturedScope)
captured_scopes [child];
+ if (captured == null) {
+ captured = new CapturedScope (this, child);
+ captured_scopes.Add (child, captured);
+ }
return captured;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches