The Golden Spot

I hope this helps someone who is learning about Linux and web application programming with Python, Django, and Javascript.

Friday, September 19, 2014

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/

0 Comments:

Post a Comment

<< Home