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 original AboutTypeVariance koan defined the following class hierarchy:
class Fruit
abstract class Citrus extends Fruit
class Orange extends Citrus
class Tangelo extends Citrus
class Apple extends Fruit
class Banana extends Fruit
I feel, adding this information to the type variance exercise would help readers fully understand the examples. Namely, in the following contravariance example, it is important to know that Citrus is a superclass of both Orange and Tangelo.
val orangeBasket: MyContainer[Orange] = new MyContainer[Citrus](new Tangelo)
The text was updated successfully, but these errors were encountered:
The original AboutTypeVariance koan defined the following class hierarchy:
I feel, adding this information to the type variance exercise would help readers fully understand the examples. Namely, in the following contravariance example, it is important to know that
Citrus
is a superclass of bothOrange
andTangelo
.The text was updated successfully, but these errors were encountered: