Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

37 lines
480 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
class MyList<T> : IEnumerable<T>
{
public IEnumerator<T> GetEnumerator ()
{
yield break;
}
IEnumerator IEnumerable.GetEnumerator ()
{
return GetEnumerator ();
}
}
struct Foo<T>
{
public readonly T Data;
public Foo (T data)
{
this.Data = data;
}
}
class X
{
public static void Main ()
{
MyList<Foo<int>> list = new MyList <Foo<int>> ();
foreach (Foo<int> foo in list)
;
}
}