2009-11-24 Jb Evain <jbevain@novell.com>
authorJb Evain <jbevain@gmail.com>
Tue, 24 Nov 2009 13:58:53 +0000 (13:58 -0000)
committerJb Evain <jbevain@gmail.com>
Tue, 24 Nov 2009 13:58:53 +0000 (13:58 -0000)
* ArrayTest.cs: add test ensuring we do not allow open
generic types in CreateInstance.

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

mcs/class/corlib/Test/System/ArrayTest.cs
mcs/class/corlib/Test/System/ChangeLog

index e12bb6d045030d56ffd56b394e0e44685e463656..b17968aad8487aa155d4d640719d3185ea6f4ce9 100644 (file)
@@ -3062,5 +3062,14 @@ public class ArrayTest
        {
                Array.CreateInstance (typeof (void), 42);
        }
+
+       class Foo<T> {}
+
+       [Test]
+       [ExpectedException (typeof (NotSupportedException))]
+       public void ArrayCreateInstanceOfOpenGenericType ()
+       {
+               Array.CreateInstance (typeof (Foo<>), 42);
+       }
 }
 }
index 36ae711469d407c8256fd55d6ac9b1a2f41f7e8f..735a706873b3ad8a152bb93d1d5fb413da2948f9 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-24  Jb Evain  <jbevain@novell.com>
+
+       * ArrayTest.cs: add test ensuring we do not allow open
+       generic types in CreateInstance.
+
 2009-11-24  Jb Evain <jbevain@novell.com>
 
        * ArrayTest.cs: Add test ensuring we do not allow void arrays.