2010-06-15 Marek Safar <marek.safar@gmail.com>
authorMarek Safar <marek.safar@gmail.com>
Tue, 15 Jun 2010 13:12:48 +0000 (13:12 -0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 15 Jun 2010 13:12:48 +0000 (13:12 -0000)
A fix for bug #612146
* generic.cs: Don't use fixed array for inflated type parameter
interface constraints.

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

mcs/mcs/ChangeLog
mcs/mcs/generic.cs

index e8be0fc1fefe8d8deba57a9b7d7b487f1f6b6299..cf243a0698a00bdb7d723a60b575d4b406d20062 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-15  Marek Safar  <marek.safar@gmail.com>
+
+       A fix for bug #612146
+       * generic.cs: Don't use fixed array for inflated type parameter
+       interface constraints.
+       
 2010-06-15  Marek Safar  <marek.safar@gmail.com>
 
        * typespec.cs: ElementTypeSpec has to use its own ITypeDefinition.
index 5a925c9012a22c5cafad59c04c79845152fe1974..11a913a4f6d0362f46cfce7fe0415e7b3411d4e7 100644 (file)
@@ -948,9 +948,9 @@ namespace Mono.CSharp {
                        var tps = (TypeParameterSpec) MemberwiseClone ();
                        tps.BaseType = inflator.Inflate (BaseType);
                        if (ifaces != null) {
-                               tps.ifaces = new TypeSpec[ifaces.Count];
+                               tps.ifaces = new List<TypeSpec> (ifaces.Count);
                                for (int i = 0; i < ifaces.Count; ++i)
-                                       tps.ifaces[i] = inflator.Inflate (ifaces[i]);
+                                       tps.ifaces.Add (inflator.Inflate (ifaces[i]));
                        }
                        if (targs != null) {
                                tps.targs = new TypeSpec[targs.Length];