Created
January 16, 2013 20:55
-
-
Save sofoklis/4550868 to your computer and use it in GitHub Desktop.
contravarian 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 contravariantType1: ContravariantType[String] = new ContravariantType[String] // Allowed | |
val contravariantType2: ContravariantType[Any] = new ContravariantType[String] // Compile error | |
val contravariantType3: ContravariantType[String] = new ContravariantType[Any] // Allowed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment