Skip to content

Instantly share code, notes, and snippets.

@bbarker
Created December 12, 2021 04:22
Show Gist options
  • Save bbarker/d8e5403840d0e054e7e35a440ef81258 to your computer and use it in GitHub Desktop.
Save bbarker/d8e5403840d0e054e7e35a440ef81258 to your computer and use it in GitHub Desktop.
This problem would not arise if either or both of Outer or Inner had been declared with a covariant type parameter (+A) (try it), e.g.:
case class Inner[+A](a: A)
// Or:
case class Outer[+A](a: Inner[A])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment