Skip to content
Browse files

Test for bug #440819.

svn path=/trunk/mono/; revision=117767
  • Loading branch information...
1 parent e00ca2d commit ab03637ef22ebd0c363a06b06be4d339aae6eb26 @illupus illupus committed Nov 3, 2008
Showing with 20 additions and 0 deletions.
  1. +1 −0 mono/tests/Makefile.am
  2. +19 −0 mono/tests/generic-array-iface-set.2.cs
View
1 mono/tests/Makefile.am
@@ -286,6 +286,7 @@ BASE_TEST_CS_SRC= \
generic-type-builder.2.cs \
generic-synchronized.2.cs \
generic-delegate-ctor.2.cs \
+ generic-array-iface-set.2.cs \
bug-431413.2.cs \
generic-virtual-invoke.2.cs \
recursive-generics.2.cs \
View
19 mono/tests/generic-array-iface-set.2.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+class A {
+ static int Main ()
+ {
+ A [] aa = new A [1];
+ IList<object> io = aa;
+ try {
+ io [0] = new object ();
+ A a = aa [0];
+ Console.WriteLine ("{0}", a.GetType ());
+ } catch (ArrayTypeMismatchException) {
+ return 0;
+ }
+ return 1;
+
+ }
+}

0 comments on commit ab03637

Please sign in to comment.
Something went wrong with that request. Please try again.