Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / gtest-557.cs
1 using System.Collections.Generic;
2
3 class Test
4 {
5         static U[] Foo<T, U> (T[] arg) where T : class, U
6         {
7                 return arg;
8         }
9
10         static void TestByRef<T> ()
11         {
12                 T[] array = new T[10];
13                 PassByRef (ref array[0]);
14         }
15
16         static void PassByRef<T> (ref T t)
17         {
18                 t = default (T);
19         }
20
21         public static int Main ()
22         {
23                 foreach (var e in Foo<string, object> (new string[] { "as" })) {
24                 }
25
26                 TestByRef<byte> ();
27
28                 return 0;
29         }
30 }