Created
February 14, 2016 12:13
-
-
Save anonymous/7f970b41367a20d8840d to your computer and use it in GitHub Desktop.
can't existentially abstract over
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
import language.higherKinds | |
trait A { | |
type F[_[_]] | |
} | |
class B extends A{ | |
override type F[X[_]] = X[Int] | |
} | |
val b = new B // This is valid | |
val a = new A { // But this is not | |
override type F[X[_]] = X[Int] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment