"List" is invariant. Consider using "Sequence" instead, which is covariant ---.
You used generics and boom! 💥 "List" is invariant. Consider using "Sequence" instead.
You just got this error and perhaps you have already fixed it but still wonder why it happened at all. In this video, you learn to fix the problem and why it happened by learning about variance in programming languages.
Written by Loek van den Ouweland on 2024-06-01.
Questions regarding this artice? You can send them to the address below.