Fix #80731.
* decl.cs (DeclSpace): If we're a partial class, use our
`PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
svn path=/trunk/mcs/; revision=74367
(FlowBranching.MergeSiblings): Likewise.
* statement.cs: Likewise.
+2007-03-15 Martin Baulig <martin@ximian.com>
+
+ Fix #80731.
+
+ * decl.cs (DeclSpace): If we're a partial class, use our
+ `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
+
2007-03-15 Martin Baulig <martin@ximian.com>
Fix #79302.
get {
if (!IsGeneric)
throw new InvalidOperationException ();
+ if ((PartialContainer != null) && (PartialContainer != this))
+ return PartialContainer.TypeParameters;
if (type_param_list == null)
initialize_type_params ();
get {
if (!IsGeneric)
throw new InvalidOperationException ();
+ if ((PartialContainer != null) && (PartialContainer != this))
+ return PartialContainer.CurrentTypeParameters;
if (type_params != null)
return type_params;
else
--- /dev/null
+// Bug #80731
+public partial class A<T>
+{
+ public class B {}
+}
+
+public partial class A<T>
+{
+ public B Test;
+}
+
+class X
+{
+ static void Main ()
+ {
+ A<int> a = new A<int> ();
+ a.Test = new A<int>.B ();
+ }
+}