add bug info
[mcs.git] / tests / gtest-iter-13.cs
blobde07d15ee813a6906b7ac3d8eb9a4b95402abfd1
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
5 class C<T>
7 public IEnumerator GetEnumerator ()
9 return new T[0].GetEnumerator ();
12 public IEnumerable<T> Filter (Func<T, bool> predicate)
14 foreach (T item in this)
15 if (predicate (item))
16 yield return item;
20 class M
22 public static void Main ()
24 foreach (var v in new C<long>().Filter(null)) {