diff options
author | Miguel de Icaza <miguel@gnome.org> | 2007-03-06 01:06:23 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2007-03-06 01:06:23 +0300 |
commit | 2a4449e5b4f657a14d404e19e23543d4cb85c942 (patch) | |
tree | 845dec10a32d6431b5efda15c1e5ac0a53e5ba01 /mcs/tests/gtest-312.cs | |
parent | 0d7f04e0e4f9a802537d5c9f63e418121926519a (diff) |
2007-03-05 David Mitchell <dmitchell@logos.com>
* convert.cs: Implement From System.Collecitons.Generic.IList<T>
and its base interfaces to a one-dimensional array type S[],
provided there is an implicit or explicit reference conversion
from S to T.
svn path=/trunk/mcs/; revision=73765
Diffstat (limited to 'mcs/tests/gtest-312.cs')
-rw-r--r-- | mcs/tests/gtest-312.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/tests/gtest-312.cs b/mcs/tests/gtest-312.cs new file mode 100644 index 00000000000..eb1f5abacf6 --- /dev/null +++ b/mcs/tests/gtest-312.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +class CantCastGenericListToArray +{ + public static void Main(string[] args) + { + IList<string> list = new string[] { "foo", "bar" }; + string[] array = (string[])list; + if (list.Count != array.Length) + { + throw new System.ApplicationException(); + } + } +} |