Skip to content

Instantly share code, notes, and snippets.

@jroesch
Created February 24, 2015 21:42
Show Gist options
  • Save jroesch/7f55c3a2692fca8da3c1 to your computer and use it in GitHub Desktop.
Save jroesch/7f55c3a2692fca8da3c1 to your computer and use it in GitHub Desktop.
object P {
trait X { type A }
object J extends X { type A = Int }
def foo[Y](x: X { type A = Y }): x.A = x match { case J => 1 }
foo(J)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment