Method Covariance in Scala
Consider these base classes
Let's look at this method that has a covariant return value for the class GardenItem:
And an example that will not compile:
references:
- Type Basics
- Covariance and Contravariance in Scala/
I hope this helps someone who is learning about Linux and web application programming with Python, Django, and Javascript.
0 Comments:
Post a Comment
<< Home