Merge pull request #347 from JamesB7/master
[mono.git] / mcs / tests / gtest-iter-26.cs
1 using System.Collections.Generic;
2 using System.Reflection;
3 using System.Runtime.CompilerServices;
4
5 namespace Test
6 {
7         public static class Program
8         {
9                 public static int Main ()
10                 {
11                         var m = typeof (Program).GetMethod ("Test");
12                         var attr = m.GetCustomAttribute<IteratorStateMachineAttribute> ();
13                         if (attr == null)
14                                 return 1;
15
16                         if (attr.StateMachineType == null)
17                                 return 2;
18
19                         return 0;
20                 }
21
22                 public static IEnumerable<object> Test ()
23                 {
24                         yield return null;
25                 }
26         }
27 }