Author: marek
Date: 2007-10-05 16:08:17 -0400 (Fri, 05 Oct 2007)
New Revision: 87007
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/anonymous.cs
trunk/mcs/mcs/decl.cs
Log:
2007-10-05 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #324677
* anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
parent container of a scope container with currently resolved one.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-10-05 19:48:19 UTC (rev 87006)
+++ trunk/mcs/mcs/ChangeLog 2007-10-05 20:08:17 UTC (rev 87007)
@@ -1,5 +1,11 @@
2007-10-05 Marek Safar <[EMAIL PROTECTED]>
+ A fix for bug #324677
+ * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
+ parent container of a scope container with currently resolved one.
+
+2007-10-05 Marek Safar <[EMAIL PROTECTED]>
+
A fix for bug #325534
* class.cs (Invocation.DoResolve): Check invocation of object finalizer
only.
Modified: trunk/mcs/mcs/anonymous.cs
===================================================================
--- trunk/mcs/mcs/anonymous.cs 2007-10-05 19:48:19 UTC (rev 87006)
+++ trunk/mcs/mcs/anonymous.cs 2007-10-05 20:08:17 UTC (rev 87007)
@@ -1530,6 +1530,13 @@
aec.CurrentAnonymousMethod = this;
aec.IsStatic = ec.IsStatic;
+
+ //
+ // HACK: Overwrite parent declaration container to
currently resolved.
+ // It's required for an anonymous container inside
partial class.
+ //
+ if (RootScope != null)
+ aec.DeclContainer.Parent = ec.TypeContainer;
IDisposable aec_dispose = null;
if (ec.InferReturnType)
Modified: trunk/mcs/mcs/decl.cs
===================================================================
--- trunk/mcs/mcs/decl.cs 2007-10-05 19:48:19 UTC (rev 87006)
+++ trunk/mcs/mcs/decl.cs 2007-10-05 20:08:17 UTC (rev 87007)
@@ -300,7 +300,7 @@
}
}
- public readonly DeclSpace Parent;
+ public /*readonly*/ DeclSpace Parent;
/// <summary>
/// Location where this declaration happens
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches