[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / gtest-iter-15.cs
blob4955cee96ae27773c981227fe774826b067981d4
1 using System;
2 using System.Collections.Generic;
4 internal class C<TFirst>
6 internal struct VSlot<T>
8 public readonly T Value;
10 public VSlot (T value)
12 Value = value;
16 internal IEnumerable<V> GetEnumerable<V> (IEnumerable<VSlot<V>> input)
18 foreach (var v in input)
19 yield return v.Value;
23 class C
25 public static int Main ()
27 var c = new C<long> ();
28 string value = null;
29 foreach (var v in c.GetEnumerable (new[] { new C<long>.VSlot<string> ("foo") })) {
30 value = v;
33 if (value != "foo")
34 return 1;
36 return 0;