Skip to content

Instantly share code, notes, and snippets.

@GEverding
Created February 18, 2014 14:45
Show Gist options
  • Save GEverding/9072313 to your computer and use it in GitHub Desktop.
Save GEverding/9072313 to your computer and use it in GitHub Desktop.
Playing around with scala
trait TestClass
case class TestClassA(val id: Int) extends TestClass
case class TestClassB(val name: String) extends TestClass
case class TestClassC(val arg: Float)
trait TestClassConverter[A <: TestClass, B <: TestClass] {
def toTestClass(a: A): B
}
class Tester(val name: String) extends TestClassConverter[TestClassA, TestClassB] {
override def toTestClass(a: TestClassA): TestClassB = { ??? }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment