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

45 lines
702 B
C#

using System;
public interface IDirectedEnumerable<T>
{
IDirectedEnumerable<T> Backwards();
}
public interface IDirectedCollectionValue<T> : IDirectedEnumerable<T>
{
new IDirectedCollectionValue<T> Backwards();
}
public class GuardedCollectionValue<T> : IDirectedCollectionValue<T>
{
IDirectedEnumerable<T> IDirectedEnumerable<T>.Backwards ()
{
return this;
}
public IDirectedCollectionValue<T> Backwards ()
{
return this;
}
}
public interface ISequenced<T> : IDirectedCollectionValue<T>
{
}
public class GuardedSequenced<T>
{
ISequenced<T> sequenced;
public IDirectedCollectionValue<T> Test ()
{
return sequenced.Backwards();
}
}
class X
{
public static void Main ()
{ }
}