Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2016 12:13
Show Gist options
  • Save anonymous/7f970b41367a20d8840d to your computer and use it in GitHub Desktop.
Save anonymous/7f970b41367a20d8840d to your computer and use it in GitHub Desktop.
can't existentially abstract over
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