Created
January 16, 2013 20:17
-
-
Save sofoklis/4550489 to your computer and use it in GitHub Desktop.
Covariant example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val covariantType1: CovariantType[String] = new CovariantType[String] // Allowed | |
val covariantType2: CovariantType[Any] = new CovariantType[String] // Allowed | |
val covariantType3: CovariantType[String] = new CovariantType[Any] // Compile error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment