You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is that T is covariant, but it's being used in a base class list whose corresponding type parameter is invariant. This means usage of the resulting subclass MyList can now violate the variance of its base class.
A type checker should catch this case and report an error.