Scala list of any and list of something extending Any. What is a difference?

Could anyone explain what is difference between: Seq[Any] and Seq[_ <: Any] ?
To my eye, I can put everything in both cases as everything extends Any.



Read more here: https://stackoverflow.com/questions/64417576/scala-list-of-any-and-list-of-something-extending-any-what-is-a-difference

Content Attribution

This content was originally published by tomek.xyz at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: