Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / bug-3903.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4
5 struct Foo
6 {
7 }
8
9
10 public class TestClass
11 {
12     public static int Main ()
13     {
14         Foo[][] array = new Foo[][] { new Foo[0] };
15                 IEnumerable<object> aa1 = array;
16                 foreach (var x in aa1) Console.WriteLine (x);
17                 aa1.GetEnumerator ().ToString ();
18
19                 int[] array2 = new int[10];
20                 IEnumerable<uint> aa2 = (uint[])(object)array2;
21                 foreach (var x in aa2) Console.WriteLine (x);
22                 aa2.GetEnumerator ().ToString ();
23
24         // The next line will crash
25         List<object> list = array.Cast<object>().Select((arg) => arg).ToList();
26                 return 0;
27     }
28 }