Skip to content

Instantly share code, notes, and snippets.

@excavador
Created April 4, 2013 15:04
Show Gist options
  • Save excavador/5311154 to your computer and use it in GitHub Desktop.
Save excavador/5311154 to your computer and use it in GitHub Desktop.
abstract class Response
case class Token() extends Response
case class Problem() extends Response
case class Connection() extends Problem
case class InvalidResponse() extends Problem
@excavador
Copy link
Author

:10: error: case class Connection has case ancestor Problem, but case-t
o-case inheritance is prohibited. To overcome this limitation, use extractors
to pattern match on non-leaf nodes.
case class Connection() extends Problem
^
:10: error: case class InvalidResponse has case ancestor Problem, but c
ase-to-case inheritance is prohibited. To overcome this limitation, use extrac
tors to pattern match on non-leaf nodes.
case class InvalidResponse() extends Problem

@lazyval
Copy link

lazyval commented Apr 4, 2013

@zamotivator Please, see https://gist.github.com/lazyval/5313079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment