[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-anon-104.cs
1 // Compiler options: /unsafe
2 using System;
3 using System.Collections.Generic;
4
5 unsafe class Test
6 {
7         public static void Main ()
8         {
9                 foreach (int item in GetItems ()) {
10                         Console.WriteLine (item);
11                 }
12         }
13
14         public static unsafe int GetItem ()
15         {
16                 byte[] value = new byte[] { 0xDE, 0xAD, 0xBE, 0xEF };
17
18                 fixed (byte* valueptr = value) {
19                         return *(int*) valueptr;
20                 }
21         }
22
23         public static IEnumerable<int> GetItems ()
24         {
25                 yield return GetItem ();
26         }
27 }