Take stars out of types where they make more sense.
[mono-project.git] / mcs / tests / gtest-499.cs
blobd6640acf438372974ef5b86bdd3fe1f150edd9b8
1 // Compiler options: -optimize
3 using System;
4 using System.Reflection;
6 public class C
8 public static int Test<T> (T[] t)
10 // Has to include readonly. prefix
11 return t[0].GetHashCode ();
14 public static int TestExtra<T> (T[,] t)
16 // Has to include readonly. prefix
17 return t[0, 0].GetHashCode ();
20 public static int Main ()
22 Test (new[] { 2.1, 4.5 });
23 Test (new[] { "b" });
25 var body = typeof (C).GetMethod ("Test").GetMethodBody ();
27 // Check for readonly. (0xFE1E)
28 var array = body.GetILAsByteArray ();
29 if (array[2] != 0xFE)
30 return 1;
32 if (array[3] != 0x1E)
33 return 1;
35 return 0;