interface Moogie [T] { } interface IBuggy [+P, -M] { Get (i : int) : M; // E: return type of method `Get' must behave covariantly IsEmpty : Moogie [M] { get; }; // E: return type of method `get_IsEmpty' must behave covariantly Set (x : P) : void; // E: type of `Set' method's parameter `x' must behave contravariantly MeGene ['a] (x : int) : void where 'a : P; // E: constraints of generic parameters of method `MeGene' must behave contravariantly } public interface ICovariantEnumerator [+T] { MoveNext () : bool; Current : T { get; } } public interface ICovariantEnumerable [+T] { GetEnumerator () : ICovariantEnumerator [T]; SetEnumerator(e : ICovariantEnumerator [T]) : void; // E: type of `SetEnumerator' method's parameter `e' must behave contravariantly SetArray (x : array [T]) : void; // E: type of `SetArray' method's parameter `x' must behave contravariantly } interface ICovariantSubEnumerable [+T] : System.Collections.Generic.IEnumerable[T] { // E: incorrect usage of generic parameters in.* supertypes must behave covariantly } ()