Why the following code get the error?
Invalid variance: The type parameter 'T' must be invariantly valid on 'UserQuery.IItem<T>.GetList()'. 'T' is covariant.
public interface IFoo {}
public interface IBar<T> where T : IFoo {}
public interface IItem<out T> where T: IFoo
{
IEnumerable<IBar<T>> GetList();
}