Fix #80358
authorRaja R Harinath <harinath@hurrynot.org>
Sat, 27 Jan 2007 15:48:22 +0000 (15:48 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Sat, 27 Jan 2007 15:48:22 +0000 (15:48 -0000)
* decl.cs (DeclSpace.initialize_type_params): Don't access
'type_params' of a partial class directly.

svn path=/trunk/mcs/; revision=71790

mcs/mcs/ChangeLog
mcs/mcs/decl.cs

index c30f714dd2921047fd0fdad200f048e2764195ca..0fc7a557aaab5c1ec529ffc5678f59724ece8141 100644 (file)
@@ -1,3 +1,9 @@
+2007-01-27  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #80358
+       * decl.cs (DeclSpace.initialize_type_params): Don't access
+       'type_params' of a partial class directly.
+
 2007-01-26  Miguel de Icaza  <miguel@novell.com>
 
        * constant.cs: Removed a handful of out-of-range checks that were
index 50030e51214ec6b5a3eb8546f17a571e5fca04e7..6bbec398fe873cbc96eebce9830831691164c74c 100644 (file)
@@ -1158,16 +1158,14 @@ namespace Mono.CSharp {
                                the_parent = null;
 
                        int start = 0;
-                       TypeParameter[] parent_params = null;
-                       if ((the_parent != null) && the_parent.IsGeneric) {
-                               parent_params = the_parent.initialize_type_params ();
-                               start = parent_params != null ? parent_params.Length : 0;
-                       }
-
                        ArrayList list = new ArrayList ();
-                       if (parent_params != null)
+                       if (the_parent != null && the_parent.IsGeneric) {
+                               // FIXME: move generics info out of DeclSpace
+                               TypeParameter[] parent_params = the_parent.PartialContainer.TypeParameters;
+                               start = parent_params.Length;
                                list.AddRange (parent_params);
-
+                       }
                        int count = type_params != null ? type_params.Length : 0;
                        for (int i = 0; i < count; i++) {
                                TypeParameter param = type_params [i];