Created
February 18, 2014 14:45
-
-
Save GEverding/9072313 to your computer and use it in GitHub Desktop.
Playing around with scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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